Yemen's ruling party and opposition have accepted a plan for the president to step down in weeks and be granted immunity from prosecution.
Scores of protesters demanding Ali Abdullah Saleh's overthrow after almost 33 years in power have been killed in months of unrest among young Yemenis inspired by the wave of rebellion in the Arab world. The formal opposition coalition's influence over them is limited.
They accuse him of corruption and mismanagement of an impoverished state of 23 million people that analysts say could descend into anarchy.
After years of backing Mr Saleh as a bulwark against instability and the activities of al-Qaeda's active Yemeni branch, powerful neighbor Saudi Arabia and the United States had begun pressing him to negotiate to hand over power.
A plan drawn up the Gulf Cooperation Council (GCC) grouping of Gulf Arab states including Saudi Arabia proposes that Mr Saleh hand over power to his vice-president a month after an agreement is signed with the opposition, and be granted immunity from prosecution for himself, family and aides.
"The ruling party informed the foreign ministers of the GCC of their acceptance of the Gulf initiative in full," party spokesman Tariq Shami told Reuters.
There was no immediate comment from the GCC.
The opposition coalition said it would now agree to the main elements of the plan. It had previously rejected the idea of immunity for Mr Saleh.
"The opposition welcomes the initiative with the exception of the formation of a national unity government," said the current chairman of the opposition, Yassin Noman.
Opposition spokesman Mohammed Qahtan told Al-Jazeera television a necessary basis of trust was lacking for the opposition to join a national unity government, but made clear the opposition did not see this as a fundamental obstacle to the implementation of the plan.
"The vice-president will take over for a certain period and then we will see what happens," he said.
The opposition coalition has only loose influence over the turmoil on Yemen's streets.
"I'm not optimistic that the problem will end," said activist Mohammed Sharafi.
"There is still one month until the president resigns and we expect him at any moment to change his mind.
"We will not leave the arena until Saleh goes and we achieve our goals of setting up a modern, federal state."
Ibrahim al-Ba'adani, an opposition activist in the city of Ibb, said he was "surprised" at the formal opposition's acceptance of the principle of immunity for Mr Saleh.
"We will continue sit-ins until the president goes," he said.
Yemen is an aid-dependent state overwhelmed by rapid population growth, the shrinking of its oil reserves and an apocalyptic water crisis.
It is threatened by a separatist movement in the south and rebellion in the north as well as the activities of al-Qaeda in the Arabian Peninsula, which has used Yemen as a base to launch attacks on the United States.
A spokesman for the US State Department urged Mr Saleh to speed up his exit.
"President Saleh has publicly expressed his willingness to engage in a peaceful transfer of power; the timing and form of this transition should be identified through dialogue and begin immediately," he said.
In a speech earlier yesterday, as Yemenis boarded up their shops and businesses in protest against his rule, Mr Saleh accused the opposition of dragging his country of 23 million people into a civil war.
He called on young people to form a political party according to the constitution.
"They (the opposition) want to drag the area to civil war, and we refuse to be dragged to civil war," he said.
"Security, safety and stability are in Yemen's interests and the interests of the region."
Reuters