Yemen's embattled president has agreed to a proposal by Gulf Arab mediators to step down within 30 days and hand power to his deputy in exchange for immunity from prosecution.

A coalition of seven opposition parties said they also accepted the deal but with reservations. Even if the differences are overcome, those parties do not speak for all of the protesters seeking President Ali Abdullah Saleh's removal, and signs were already emerging that a deal on those terms would not end protests.

US state department spokesman Mark Toner said Washington welcomes the proposal for ending the crisis and called for immediate dialogue by all sides on a transfer of power.

"We will not speculate about the choices the Yemeni people will make or the results of their political dialogue," he said. "It is ultimately for the people of Yemen to decide how their country is governed."

Later, the White House urged all parties in Yemen "to move swiftly to implement" a deal transferring power.

The six-nation Gulf Cooperation Council has been seeking to broker an end to the crisis in Yemen.

Under the latest draft, Yemen's parliament would grant Saleh legal protection from prosecution. The president would submit his resignation to lawmakers within 30 days and hand power to his vice president, who would call for new presidential elections.

Opposition spokesman Mohammed Kahtan described the Gulf council's initiative as "positive" and said the leaders of the opposition parties have all agreed on it.

Kahtan, however, listed several reservations. He said the opposition rejects the draft proposal's call for the formation of a national unity government within seven days of the signing of a deal and wants to see Saleh step down first.

"We would have to swear an oath to Saleh, who has already lost his legitimacy," he said.

They are also against giving Yemen's parliament – dominated by Saleh's party – the power to approve or reject his resignation.

Mohammed al-Sabri, another spokesman of the opposition, said if the parties sign the initiative it does not mean the mass protests will come to a quick end.

"We don't represent everybody in the squares. We only represent the political parties," he said.

A spokesman for the youth movement that is one of the key organisers of street protests said any deal that protects him from prosecution is unacceptable.

He should be held responsible for the killings of protesters and corruption, said Khaled al-Ansi.

"The youth of the revolution reject any initiative that gives immunity to the president, who collaborated in killings of civilians and in corruption," he said. "The GCC initiative is actually violating the basic principles of justice."