A deal to end Yemen's political crisis hit a potential snag on Saturday as doubts were raised about whether President Ali Abdullah Saleh would personally sign an agreement that would have him quit power within a month.

But the country's main opposition coalition said it still hoped wealthy Gulf states who brokered the deal would be able to ensure a signature by Saleh, a shrewd political survivor who has faced three months of pro-democracy protests seeking his ouster.

"Until now, we still have hope that the efforts of the Secretary-General of the Gulf Cooperation Council will succeed in persuading the president to sign," a prominent opposition leader told Reuters, speaking on condition of anonymity.

Saleh, who has ruled the impoverished Arabian Peninsula state for nearly 33 years, had been due to sign the deal on Saturday in an agreement that, if implemented, would make him the third Arab ruler ousted by a wave of popular uprisings.

But in a last-minute wrinkle, a government official said talks were under way within the ruling party on whether Saleh would personally sign or leave it to senior members of his party. Such a move could throw the entire deal into doubt.

"There is discussion on the matter at the moment," the official said. Other officials previously said repeatedly that Saleh would sign on Saturday.

The United States and neighboring oil giant Saudi Arabia want the Yemen standoff resolved to avert chaos that could enable al Qaeda's Yemen wing to operate more freely.

Saleh has in principle accepted the agreement negotiated by his oil-exporting GCC neighbors.

Yemen's mainstream opposition, which includes both Islamists and leftists, has also agreed to the deal, even as street protesters have rejected the agreement and demand Saleh step down immediately and face prosecution.

Saleh, long considered a U.S. ally against al Qaeda's Yemen-based wing, had already forced mediators to split the signing ceremonies over two days and has objected to the presence of Qatari officials.

Qatar's prime minister was first to state publicly the Gulf deal would seek Saleh's resignation, and its satellite TV channel Al Jazeera has been accused by Saleh of inciting revolt in the Arab world, now swept by pro-democracy demonstrations.

While the Yemeni leader was due to sign the pact in Sanaa, his party's vice president will travel to the Saudi capital Riyadh for Sunday's official signing ceremony by the opposition, which has warned that further bloodshed could derail the deal.

Violence in south Yemen

Violence broke out in south Yemen ahead of the expected signing when gunmen killed two police officers and wounded two more in the port city of Aden, state media said. Witnesses said the gunmen had attacked a police station. Gunfire also erupted outside a nearby prison.

Shortly afterward, security forces moved in to break up an anti-government protest in the same neighborhood, killing two protesters and wounding 50 more, said Qassim Jamil, a doctor.

Protesters fled the scene, and tanks and armored vehicles were patrolling the streets, the witnesses said. The wounded were being taken to nearby hotels for treatment because they could not reach hospitals, Jamil said.

Analysts say the government, which has been trying to contain separatists in the south and Shi'ite rebels in the north, fears secessionists may be trying to take advantage of Yemen's leadership crisis to renew a push for separation.

Protesters say they will stay on the streets until Saleh leaves. They also called for him to be put on trial for corruption and the deaths of the estimated 144 protesters killed since rallies began three months ago.

The GCC deal offers Saleh and his entourage, including relatives who run branches of the security forces, immunity from prosecution.

"The people want the trial of the murderer!" some anti-Saleh demonstrators shouted at a protest on Friday that ended in a funeral march for 12 protesters killed on Wednesday, thousands passing their wooden coffins from hand to hand to their graves.

Analysts say a 30-day window for Saleh to resign gives plenty of time for disgruntled forces from the old guard to stir trouble in Yemen, where half the population owns a gun and al Qaeda has gained a foothold in its mountainous regions.

Should the deal go through, Saleh would appoint a prime minister from the opposition to head a transitional government, which would set a presidential vote for 60 days after he leaves.

Many protesters, wary of the opposition due to its presence in government in past years, urged it to back out of the deal.

"They wouldn't lose anything because Saleh isn't going to stick to the agreement. If he can't find a reason to overturn it he'll spark a war," Sanaa protester Abdulsalam Mahmoud said.