HARARE, Zimbabwe (CNN) -- A power-sharing deal has been reached between Zimbabwean President Robert Mugabe and the opposition Movement for Democratic Change, South African President Thabo Mbeki said.

Zimbabwe President Robert Mugabe, left, and opposition leader Morgan Tsvangirai.

Mbeki, who mediated the talks in Harare for the Southern African Development Community, said the deal would be signed Monday but did not give details of the agreement.

Zimbabwe has had no Cabinet since the March presidential election that started the impasse.

Opposition lawmakers booed and heckled Mugabe when he spoke at the opening of the country's parliament August 26.

MDC leader Morgan Tsvangirai won the most votes in that election, but not enough to avoid a runoff, according to the government's official count.

He withdrew from the June 27 runoff days before the vote, saying Mugabe's supporters had waged a campaign of violence and intimidation against opposition supporters.

The main sticking point in the talks had been how much power Mugabe would retain.

Tsvangirai had said he would sign a deal only if Mugabe gave up some power and his presidency became a ceremonial position.

United Nations Secretary-General Ban Ki-moon welcomed the agreement, according to a statement released by his spokesperson, and "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."