HARARE, Zimbabwe (CNN) -- Zimbabwe's political rivals set aside deep differences Monday to sign a power-sharing deal intended to end the violent crisis that has paralyzed the country since the disputed election in March.
To jubilant cheers, longtime Zimbabwean president Robert Mugabe shook hands with rival Morgan Tsvangirai at the ceremony.
"Divisions, polarization and hatred belong to the past," Tsvangirai said after the deal was signed.
"Let us not be divided by our past, but united by our hope for the future."
Under the deal, Mugabe remains president, while Tsvangirai becomes prime minister and coordinator of government affairs.
The leaders of the 14-member Southern African Development Community attended the signing of the agreement, which was brokered by South African leader Thabo Mbeki after months of protracted debate.
Third party leader Arthur Mutambara will become deputy prime minister under the agreement which he called "a compromise document, flaws, warts and all."
The leaders of the 14 member Southern African Development Community (SADC) attended the signing of the agreement, which was brokered by South African leader Thabo Mbeki after months of protracted debate.
Mugabe, Tsvangirai and Mutambara joined hands with Mbeki after exchanging the signed papers, a remarkable scene just months after political violence spread across Zimbabwe in the wake of the disputed elections. Watch leaders join hands at signing ceremony »
President Mugabe, the 84-year-old veteran leader of Zimbabwe since 1980, was also effusive in his talk of unity among former rivals.
"We have to walk and walk the same route," Mugabe said.
But Mugabe said Britain and the United States must keep out of Zimbabwe's politics, which he called a "salient principal" that must be observed by the new government.
He accused Britain -- "our erstwhile colonial master" -- of pushing for regime change because it still had designs on Zimbabwe's natural resources.
"As we move forward, as long as certain salient principles are recognized, we will find room for agreement," he said.
Tsvangirai called for the international community to resume sending food and medical aid to Zimbabwe, which was slowed by the violence that followed the elections.
His top priority, he said, is to address "devastating food shortages.
"The policies in the past have made Zimbabwe a nation where the healthy flee and the sickly die," he said.
Under the agreement, Mugabe will chair a Cabinet. Tsvangirai will be prime minister, responsible for policy formulation and implementation and will preside over a council of ministers.
Zimbabwe has had no Cabinet since the March presidential election that started the current political impasse.
The Cabinet and council of ministers will confer on government affairs and policy issues. The Cabinet will be the policy-making body and the council of ministers will be a liaison platform.
Mugabe will be in charge of all state security affairs. Tsvangirai will supervise all ministers and deal with day-to-day government issues and will head government business in parliament.
ZANU-PF will have 15 ministers in the council and the MDC will have 13. Mutambara's MDC splinter group will have three.
"There is going to be a new constitution in 18 months after which it will be assessed whether there must be a fresh election," a ZANU-PF source said.
The deal ends months of waiting for a country torn apart after the presidential vote in March.
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.
Regardless of the details of the deal, the main issue facing the leaders now is how to resuscitate Zimbabwe's economy, which is in a freefall. Once a prosperous nation, Zimbabwe now has the world's highest inflation -- officially at 11.2 million percent.
The country is experiencing acute shortages of foreign currency, fuel, electricity, medicines, and basic food like corn meal, milk, and bread. More than 5 million people out of a population of about 13 million are said to have fled the country.