SANAA (Reuters) - Yemeni President Ali Abdullah Saleh has agreed to step down within weeks in return for immunity from prosecution, putting him on course to become the third veteran Arab leader toppled this year by street unrest.
Protesters, who have taken to the streets in their tens of thousands for months to demand the end of his nearly 33-year rule, said they would not stop street demonstrations until he leaves office once and for all.
Scores of demonstrators demanding Saleh's overthrow have been killed in months of unrest among young Yemenis inspired by the wave of rebellion across North Africa and the Middle East that brought down the leaders of Tunisia and Egypt.
"There is still one month until the president resigns and we expect him at any moment to change his mind," said activist Mohammed Sharafi. "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" that the formal opposition had accepted the principle of immunity for Saleh.
"We will continue sit-ins until the president goes," he said.
Yemen, with 23 million people, is one of the poorest countries in the Arab world, and demonstrators accuse Saleh of corruption and mismanagement during his decades in power. He took power in North Yemen in 1978 and presided over its unification with the separate state of South Yemen in 1990.
In recent years he has positioned himself as an ally of the United States against al Qaeda, while also battling Shi'ite rebels in the north of the country and separatists in the south.
His opponents accused him of using the country's perpetual security crisis to entrench his inner circle. Harsh crackdowns on street demonstrations only further angered the protesters.
After years of backing 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.
"We encourage all parties to move swiftly to implement the terms of the agreement so that the Yemeni people can soon realize the security, unity and prosperity that they have so courageously sought and so richly deserve," White House spokesman Jay Carney said in a statement.
The plan drawn up the Gulf Cooperation Council (GCC) grouping of Gulf Arab states, including Saudi Arabia, proposed that Saleh hand over power to his vice-president a month after an agreement was signed with the opposition. He would be granted immunity from prosecution for himself, family and aides.
"The president and the (ruling) GPC party agree with this initiative with all its items," Deputy Information Minister Abdoh al-Janady told reporters on Saturday. "Under this final approval, there are no reservations."
The opposition coalition said on Saturday it had agreed to the main elements of the plan, although opposition leaders had rejected a proposal to join a national unity government.
"The opposition welcomes the initiative with the exception of the formation of a national unity government," said opposition chairman Yassin Noman.
Yemen is an aid-dependent state overwhelmed by rapid population growth, the shrinking of its oil reserves and a severe water crisis.
Earlier on Saturday, Saleh 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," Saleh said.
"Security, safety and stability are in Yemen's interests and the interests of the region."
Writing by Andrew Roche and Peter Graff