Thabo Mbeki, the mediator who worked out the deal, did not immediately offer details Thursday, but said the agreement would be signed and made public Monday.
"I am absolutely certain that the leadership of Zimbabwe is committed to implementing these agreements," Mbeki said at a late-night news conference.
Opposition leader Morgan Tsvangirai also told reporters the parties "have got a deal." There was no immediate statement from Mugabe.
Tsvangirai has been refusing to back down on his insistence that he should be head of government and preside over Cabinet meetings, relegating Mugabe to a ceremonial position. Mugabe, 84, had shown little willingness to relinquish much power.
Mbeki had imposed a news blackout, leading to intense speculation in Zimbabwe over the emerging deal.
Mbeki has been in Zimbabwe since Monday trying to resolve the impasse. For a year, he has been trying to bring Mugabe and Tsvangirai closer together, insisting - despite accusations he was biased in favor of Mugabe - that his policy of refusing to confront or publicly criticize either party was the best approach.
"The agreement has once more underlined our often stated view that only the people of Zimbabwe, acting with the support of the international community, can author their own destiny," Mbeki's government said in a statement following his announcement.
Others, including African leaders traditionally reluctant to criticize one of their own, had been increasingly impatient with Mugabe, who has been accused of trampling on Zimbabwean's political rights and ruining the economy of what had once been the region's breadbasket. Neighboring countries coping with Zimbabwean refugees were among the sharpest critics.
Tsvangirai's party won the most votes in legislative and presidential elections in March, but he did not win enough to avoid a runoff against Mugabe. An onslaught of state-sponsored violence against Tsvangirai's supporters forced him to drop out of the presidential runoff.
Mugabe kept Tsvangirai's name on the ballot and was declared the overwhelming winner of a runoff that was widely denounced as a sham.
Much of Mugabe's popularity at home and across the continent is linked to his image as a proud African leader unafraid to defy the West. Tsvangirai, who lacks Mugabe's anti-colonial credentials, has said Zimbabwe needs to work with the West to overcome its economic and political crises.
A political settlement would free the leaders to address Zimbabwe's severe economic problems - which include having the world's highest inflation rate and chronic food and fuel shortages.
Foreign investors have been wary because of the political uncertainty. Western governments are poised to help with grants and loans, but will not deal with Mugabe, who they denounce as a dictator.