South African President Thabo Mbeki said Mugabe will be president in the new government, while main opposition leader Morgan Tsvangirai is prime minister. A smaller opposition group's leader Arthur Mutambara is deputy prime minister.
The deal is the result of three months of difficult negotiations mediated by Mbeki at the behest of the Southern African Development Community.
"We have to walk the same route the same way," Mugabe said in a speech after the signing ceremony, which was attended by leaders of the 14-member regional bloc and of the African Union.
"Are we beginning today? No. We have been walking the same route without knowing it, or not recognizing each other. After all, we are all Zimbabweans and is there any other road, any other route to follow? History makes us walk the same route."
In his speech Tsvangirai said, "Our nation looks toward us ... to deliver on the commitments contained in this agreement."
He thanked Mbeki for his efforts in finding a solution that was "acceptable to all the parties." Tsvangirai also thanked African and world leaders, including U.N. Secretary-General Ban Ki-moon, "who acknowledged that the world cannot stand idly by while a member nation slides into famine and chaos."
Tsvangirai said Zimbabweans faced the option of uniting the country and moving forward or letting the impasse "plunge our country into the abyss of a failed state."
He saluted members of parliament for their willingness to work across parties lines. "If you were my enemy yesterday, today we are bound by the same patriotic duty and destiny," he said.
He called for legislators to be "driven by the hope of a new, better, brighter country" and the "hope of a new beginning."
Thousands of supporters of the two men gathered in front of the center to celebrate, waving posters, chanting slogans and singing songs. Mugabe's supporters lifted their fists in the air in his party's salute; Tsvangirai's waved an open hand.
Mbeki and Tsvangirai announced a deal late Thursday, without providing details before Monday's signing.
Members of the opposition gave the broad outlines Friday, and Zimbabwean state radio confirmed their version Sunday. They said the agreement calls for a Cabinet with 31 members; 16 from the opposition and 15 from Mugabe's party. That would acknowledge Mugabe's party accused of holding power through violence and fraud and ruining the economy no longer has the public support it once had.
Mugabe would remain president and chairman of the Cabinet, with Tsvangirai as vice chairman. Tsvangirai would head a new Council of Ministers that will supervise the work of the Cabinet.
Mbeki arrived Monday with his foreign affairs minister, Nkosazana Dlamini-Zuma, and Sydney Mufamadi, a Cabinet minister who has led the negotiations.
"The South African government has noted that while this is cause for celebrations, we remain all too aware that this historic milestone constitutes but the end of the beginning," South Africa's government said Sunday.
The European Union welcomed the deal Monday, but foreign policy chief Javier Solana said officials would probably wait until next month to consider lifting sanctions.
Millions of dollars in Western aid is expected, if Mugabe proves genuine about sharing power and beginning to end Zimbabwe's economic and political crisis.
Some opposition members who wanted Mugabe to surrender power completely have complained the power-sharing deal does not go far enough and that it creates a complicated arrangement Mugabe could exploit, especially given the tension that exists between the two opposition factions.
Mugabe, 84, and in power since independence in 1980, and Tsvangirai, 56, are seen to have been forced into the deal by economic pressures. They have been enemies for a decade, and Tsvangirai has been jailed, beaten, tortured and tried for treason charges that were dismissed in court.
Zimbabwe has by far the world's highest official inflation of 11 million percent. Independent financial institutions put real inflation closer to 40 million percent and rising daily.
Although Tsvangirai "does not have absolute power, he does have substantial power," attorney David Coltart, an opposition lawmaker, said in a message to his supporters Friday. "This is undoubtedly historic, but we still have a long and treacherous road to travel."
Virtually all proposed opposition Cabinet ministers "have at some stage in the last nine years been brutalized on the instructions of those they will now have to work with," Coltart said. "Zimbabwe remains highly polarized, and it will take statesmanship on all sides to make this work."
In March's presidential polling, Tsvangirai won the most votes, but not enough to avoid a runoff against Mugabe. An onslaught of state-sponsored violence against Tsvangirai's supporters led him to drop out of the presidential runoff and Mugabe was declared the overwhelming winner of the second vote widely denounced as a sham.