Zimbabweans on Friday waited to hear details of a power-sharing deal reached by the country’s political rivals in a bid to end a bitter crisis after marathon talks that centred on how much authority President Robert Mugabe would cede.

South African President Thabo Mbeki, who has long served as mediator in the talks, announced the agreement Thursday in Harare, where he had been since earlier in the week to try to overcome a deadlock in the negotiations.

“An agreement has been reached on all items on the agenda… all of them endorsed the document tonight, signed it,” Mbeki told reporters.

Details of the deal were not released and Mbeki said the agreement would only be made public after a formal signing ceremony scheduled for Monday.

The South African president said the rivals will also on Monday “file a report concerning the constitutional composition of the inclusive government that has been agreed.”

The parties “will spend the next days constituting this inclusive government.” Mugabe and his longtime rival Morgan Tsvangirai had tussled in the negotiations over how to share power, with the opposition leader warning he would prefer no deal at all over a bad agreement.

Tsvangirai said recently he would not accept any accord that did not grant him sufficient power.

Control of Zimbabwe’s security forces was believed to have been one of the major stumbling blocks.

The 84-year-old Mugabe, a liberation hero in the war that led to Zimbabwe’s independence in 1980, and who has ruled since that time, has drawn strong support from the country’s security chiefs.

It remained unclear how a power-sharing government involving the two men, intense rivals for many years, would work in practice.

Tsvangirai has survived treason charges and a severe beating by the security forces in his long effort to topple Mugabe.

Mugabe, meanwhile, has labelled Tsvangirai a stooge of former colonial power Britain and declared that only God could remove him from office.

UN chief Ban Ki-moon hailed the deal and voiced hope it would pave the way for durable peace and recovery.

“The Secretary General welcomes the agreement reached today in Harare between the Government and the opposition on a government of national unity,” his press office said in a statement.

“He hopes that this agreement will pave the way for a durable peace and recovery in the country and contribute to rapid improvement in the welfare and human rights of the people of Zimbabwe, who have suffered for long,” it added.

In London a Foreign Office spokesman said: “We are following the situation closely. We look forward to seeing the detail of the agreement announced by President Mbeki this evening. Our overriding concern is the welfare of the Zimbabwean people.” The deal may amount to a measure of vindication for Mbeki, who has faced harsh criticism over what some said was his reluctance to publicly criticise Mugabe. Tsvangirai had previously called for him to be stripped of his role as mediator.

Mbeki expressed confidence that the agreement would be workable.

“I am certain the leadership of Zimbabwe is committed to implementing the agreement,” he said.