HARARE, Zimbabwe (CNN) -- Zimbabwe's president and his main political rival have signed an agreement for formal talks.
Mugabe (left) and Tsvangirai shake hands -- but only after prompting.
The deal signed Monday provides the groundwork to end political violence and establish some sort of coalition government between President Robert Mugabe and opposition leader Morgan Tsvangirai.
Mugabe stressed that the coming negotiations would involve "no dictation from the outside." He said: "We shall be doing this as Zimbabweans ... with the help of South Africa."
The signing comes three weeks after a disputed vote that Mugabe claims gave him another term in office but was decried by opponents as a fraudulent victory won through intimidation.
Both Mugabe and Tsvangirai appeared at a news conference Monday with South African President Thabo Mbeki, who mediated the memorandum of understanding.
It is the first time the bitter political rivals have appeared together publicly. At the end of the event -- but only after being prompted by Mbeki -- Mugabe and Tsvangirai shook hands. Watch as the deal is signed »
Tsvangirai said "it's too early yet to make a judgment as to the outcome of the process" but noted that it is "a collective effort and it involves tolerance, compromise, (and) putting the best interest of Zimbabwe at the forefront of these negotiations."
Tsvangirai referred to Mugabe as president of the Zanu-PF party not the country.
The signing ceremony and the following news conference, which was punctuated with outbursts of laughter, is a spark of hope for Zimbabwe, which has been mired in political chaos for months.
And it will still be seen as a diplomatic coup for Mbeki who has previously been criticized for failure to intervene over Zimbabwe..
Tsvangirai got more votes than Mugabe in March elections but the electoral commission said he did not get enough to avoid a runoff.
He withdrew from a June 27 runoff days before the vote, saying Mugabe's supporters had orchestrated a campaign of beatings, intimidation and murders against his supporters.
The elections and their violent aftermath have drawn strong criticism from the international community, with the United States and other nations calling for sanctions.
Mugabe, who has been Zimbabwe's only leader since independence in 1980, has remained defiant against pressure both from overseas and his African neighbors and until now has ignored appeals to negotiate.
But there has been a "softening of the ground" between the government and the opposition in recent days, according to a source in the capital, with restrictions on members of Tsvangirai's Movement for Democratic Change (MDC) easing.
A round up of MDC supporters by police has ended and some of the estimated 1,500 MDC supporters arrested in recent weeks have been freed, the source said.
CNN has obtained a draft of the accord that Mugabe and Tsvangirai are expected to sign.
The document says both sides are "dedicating ourselves to putting an end to the polarization, divisions, conflict and intolerance that have characterized our country's politics."
It also acknowledges "that we have an obligation of establishing a framework of working together in an inclusive government."
The agenda for the talks would include economic, political, security and media concerns in Zimbabwe, according to the draft.
Arthur Mutambara, the leader of another MDC faction, also signed the memo and will take part in the talks.
The talks, which would take place over next two weeks, would be mediated by Mbeki, as a representative of Southern African Development Community and African Union Commission chairman Jean Ping and the Southern African Development
All About Robert Mugabe • Zimbabwe • Morgan Tsvangirai