By Cynthia Johnston and Mohammed Ghobari
SANAA (Reuters) - A deal to transfer power peacefully in Yemen could emerge shortly based on an offer by President Ali Abdullah Saleh to quit by the end of the year, Foreign Minister Abubakr al-Qirbi told Reuters.
But Al Arabiya television later quoted Saleh as saying that while he was prepared to step down "with respect" even within hours in response to relentless popular unrest, a deal did not appear imminent since his opponents had hardened their demands.
Yemen, a poor and tribally divided country that has become a base for al Qaeda next to the world's top oil producer Saudi Arabia, has been in upheaval since January when the example of the Tunisian and Egyptian revolutions set off popular demonstrations to end Saleh's 32-year authoritarian rule.
"I hope it (agreement) will be today, before tomorrow," Qirbi told Reuters in an interview, adding that the time frame of a transfer of power could be negotiated.
Saleh, who oversaw the 1990 unification of north and south Yemen and emerged victorious from a civil war four years later, told tribes in Sanaa on Saturday that he would "work to avoid bloodshed using all possible means".
"We are exerting all efforts for dialogue and we hope wise people will respond to this call for dialogue to preserve the country and its stability and unity," he told the gathering.
He said on Friday he was ready to cede power to forestall more bloodshed but only to what he called "safe hands".
"President Saleh is willing to look at all possibilities, as long as there are really serious commitments by the JMP (opposition) to come and initiate a serious dialogue between them and the ruling party," Qirbi said.
But an opposition leader cast doubt on prospects for a swift accord and a Sanaa diplomat cautioned it was too soon to discuss an outcome, saying it could "go either way".
Talks have been under way on two tracks to hash out the details of a deal on a peaceful transition of power in the Arabian Peninsula state that is home to a resurgent arm of al Qaeda, Yemeni political sources have said.
Qirbi said Yemen's main opposition party would be holding talks with the ruling party on Saturday. Discussions were centering on the time frame of a transition, among other issues.
"I think the time period is something that can be negotiated. It shouldn't be really an obstacle to reach an agreement," he said.
"I think things are very close if the real intention is really to reach an agreement. But if there are parties who want to obstruct it then of course one cannot predict."
OPPOSITION SAYS DIFFERENCES REMAIN
Saleh has responded to the mass protests with a violent crackdown and a string of concessions, all rebuffed by opposition parties, including one this week to transfer power after the drafting of a new constitution and parliamentary and presidential elections by the end of the year.
The leader of Yemen's opposition coalition said the sides still had significant differences, and that while there were some contacts he did not consider them as negotiations.
"We still have a very big gap," said Yassin Noman, the rotating head of Yemen's opposition coalition. "I think he is maneuvering."
Yemeni political sources said some issues that could hold up a deal were whether the opposition would give guarantees not to pursue Saleh and his family legally. Saleh opponents also want to be sure his close relatives leave positions of power.
Western countries worry that al Qaeda militants could take advantage of any power vacuum arising from a rocky transition if Saleh, a linchpin U.S. and Saudi ally fighting for his political life, finally steps down after 32 years in office.
Washington and Riyadh, Yemen's main financial backer, have long seen Saleh as a bulwark against al Qaeda in the Arabian Peninsula (AQAP), which has tried to stage attacks beyond Yemeni soil since 2009 in both Saudi Arabia and United States.
Five suspected al Qaeda members were killed in an overnight clash when they attacked a security checkpoint in the south, a local official said. State media put the death toll at three.
More than 80 people have been killed since anti-government protests started in January to demand the departure of Saleh, a serial political survivor of civil war, separatist and rebel movements in the north and south of Yemen and militant attacks.
But the tide against Saleh appears to have turned after plainclothes snipers loyal to the president fired into an anti-government crowd, killing 52 people last Friday.
That led to a string of defections that badly eroded Saleh's position including by top military commanders such as General Ali Mohsen, as well as ambassadors, lawmakers, provincial governors and tribal leaders, some from his own tribe.
Yemeni political sources said talks to resolve the crisis have been taking place with help from Western mediators. They included a meeting between the president and Mohsen in which they discussed the future of both men.
A source close to Mohsen, who has thrown his weight behind protesters, said he and Saleh had weighed a deal in which both would leave the country, taking their sons and relatives with them to pave the way for a civilian transitional government.
Yemen lies on key shipping routes and borders Saudi Arabia, the world's leading oil exporter. It has often seemed to be on the brink of disintegration: northern Shi'ites often take up arms against Saleh and southerners dream of a separate state.
With no clear successor to Saleh in sight and conflicts wracking north and south Yemen, the country of 23 million faces the risk of a breakup, in addition to poverty, a water shortage and dwindling oil reserves. (Additional reporting by Mohamed Sudam; Writing by Samia Nakhoul; Editing by Mark Heinrich)