South African President Thabo Mbeki last night said he had successfully mediated a power-sharing deal between Zimbabwean President Robert Mugabe and the opposition.

Mbeki did not immediately offer details, but said that the formal agreement would be signed on Monday.

Opposition leader Morgan Tsvangirai had told reporters the parties "have got a deal".

Mbeki has been in Zimbabwe since Monday trying to resolve the impasse over who would wield the most authority in a unity government.

Tsvangirai has said he should be head of government and preside over cabinet meetings, while Mugabe should be relegated to a ceremonial position.

Until now Mugabe had shown little willingness to give up much of the power he has held since independence from Britain in 1980.

Once hailed as a model African democrat, Mugabe has clung to power for years despite a worsening political and economic crisis that critics blame on his policies.

Mugabe was born in 1924 on the Kutama Mission, northwest of Harare, and educated by Jesuits. He earned seven university degrees, three while in prison.

He was jailed for 10 years in 1964 for opposing white minority rule. A guerrilla war began in 1972 against Ian Smith's white government of then-Rhodesia.

Mugabe became leader of the Zanu liberation movement in the mid-1970s after his release from jail.

His party won independence elections in 1980 and Mugabe became prime minister. He took office as President in 1987 after a change in the constitution.

In 2000, Mugabe tasted defeat when voters in a referendum rejected a constitution that would have given him more power. He turned on the white minority, blaming them. He pushed legislation through parliament allowing his government to seize white-owned farms. Self-styled war veterans occupied many other farms, often using violence.

Mugabe's party lost its majority for the first time in the March 2008 elections. Mugabe was sworn in on June 29 for another five-year term after the widely condemned run-off election from which opposition leader Tsvangirai withdrew because of attacks on his supporters.