Later, Mr Mbeki told a news conference the two sides had agreed to form an inclusive government.
He said: "I am absolutely certain that the leadership of Zimbabwe is committed to implementing these agreements."
MDC spokesman Nelson Chamisa told the BBC: "Both political parties are committed, it's our wish that the deal will be successful."
Zimbabwe's envoy to the UN, Boniface Chidyausiku, told the BBC that the deal was a "triumph for African diplomacy".
The UN special representative on Zimbabwe, Haile Menkerios, said the announcement marked a way forward that all sides could live with.
Britain's Foreign Office said it was following the situation closely, adding that "our concern is the welfare of the Zimbabwean people".
The discussions are thought to have been deadlocked over how many ministries each party should have in a unity government, and how much power Mr Mugabe should retain.
Mr Tsvangirai has consistently demanded that he should become executive prime minister, thereby taking over some of the powers that Mr Mugabe has exercised for more than 28 years, the BBC's Peter Biles says.
The agreement opens the way for international donors to help to revive Zimbabwe's economy.
It is now the fastest shrinking in the world with an annual inflation galloping to more than 11m%.
Mr Mugabe, in power since independence from Britain in 1980, won a controversial June presidential run-off election unopposed after Mr Tsvangirai withdrew, claiming the MDC was the target of state-sponsored violence.
In the first presidential election in March, Mr Tsvangirai gained more votes than Mr Mugabe, but official results say he did not pass the 50% threshold for outright victory.
Earlier on Thursday, British Prime Minister Gordon Brown said any power-sharing deal in Zimbabwe would be judged by how much it reflected legitimate election results.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.