Zimbabwe's former president Robert Mugabe was granted immunity from prosecution and assured of protection in his home country as part of a deal that led to his resignation, sources close to the negotiations said on Thursday.
Mr Mugabe, who had led Zimbabwe from independence in 1980, stepped down on Tuesday after the army seized power and his own ruling party turned against him. Emmerson Mnangagwa, the former vice president sacked by Mr Mugabe earlier this month, is set to be sworn in as president on Friday.
A government source said 93-year-old Mr Mugabe told negotiators he wanted to die in Zimbabwe and had no plans to live in exile.
"It was very emotional for him and he was forceful about it," said the source. "For him it was very important that he be guaranteed security to stay in the country … although that will not stop him from travelling abroad when he wants to or has to."
Mr Mugabe resigned on Tuesday as parliament began a process to impeach him, sparking wild celebrations in the streets. His rapid downfall after 37 years in power was triggered by a battle to succeed him that pitted Mr Mnangagwa against Mr Mugabe's wife Grace, who is 40 years his junior.
"The outgoing president is obviously aware of the public hostility to his wife, the anger in some circles about the manner in which she conducted herself and approached ZANU-PF party politics," a second source said. "In that regard, it became necessary to also assure him that his whole family, including the wife, would be safe and secure."
Mr Mugabe had clung on to power precariously for a week after the military intervened. He angered many Zimbabweans when he did not resign in a televised national address on Sunday as many had anticipated. But the tipping point for him was the realisation that he would be impeached and ousted in an undignified way.
"When the process started, he then realised he had lost the party," the source said.
Mr Mugabe will receive a retirement package that includes a pension, housing, holiday and transport allowance, health insurance, limited air travel and security in accordance with Zimbabwean law.
The source said the ageing former president was "rugged and drained" by events of the past week and may travel to Singapore for medical checks in the coming week. He had been due to leave for Singapore in mid-November before the military put him under house arrest.
MEET THE NEW BOSS
Meanwhile, the new leader has promised a new age of democracy. Emmerson Mnangagwa returned to the country on Wednesday, having fled for his safety when Mr Mugabe sacked him as vice president two weeks ago to smooth a path to the succession for Grace.
"The people have spoken. The voice of the people is the voice of God," Mr Mnangagwa told thousands of supporters gathered outside the offices of the ruling ZANU-PF party in the capital, Harare.
The army appears to have engineered a trouble-free path to power for Mr Mnangagwa, who was for decades a faithful lieutenant of Mr Mugabe and member of his elite. His own human rights record also stirs hostility in many Zimbabweans. He was in charge of internal security at a time when 20,000 civilians were killed in the 1980, according to human rights groups.
Restoring the country's fortunes and international standing will be a challenge. Human rights abuses and flawed elections prompted many Western countries to impose sanctions in the early 2000s that further hurt the economy, even with Chinese investment to soften the blow. Staging clean elections next year will be key to winning new cash injections.
Zimbabwe was once one of Africa's most promising economies but suffered decades of decline as Mr Mugabe pursued policies that included the violent seizure of white-owned commercial farms and money-printing that led to hyperinflation. Most of the country's 16 million people remain poor and face currency shortages and sky-high unemployment — which Mr Mnangagwa promised to address.
A senior International Monetary Fund official said Zimbabwe's economic situation remained "very difficult" as sustainable growth is threatened by high government spending, an untenable foreign exchange regime and inadequate reforms
"Immediate action is critical to reduce the deficit to a sustainable level, accelerate structural reforms, and re-engage with the international community to access much needed financial support," said Gene Leon, IMF's mission chief for Zimbabwe.
The military is reporting "no violation of constitutional processes" in an update on its operation that led the resignation of Robert Mugabe, and has praised Zimbabweans for behaving well in their demonstrations calling for Mr Mugabe's departure and welcoming incoming leader Mr Mnangagwa.
In a statement, the military said it looks forward to "another massive gathering" for the inauguration, which the ruling party has announced will be at the 60,000-seater National Sports Stadium in the capital, Harare.
Zimbabwe's opposition party MDC-T, which supported Mr Mugabe's removal from office, says it is "cautiously optimistic" that the incoming leader "will not mimic and replicate the evil, corrupt, decadent and incompetent Mugabe regime." But the opposition will be watching Mr Mnangagwa's next moves closely, "particularly regarding the dismantling of all the oppressive pillars of repression and oppression that had been put in place by the outgoing Mugabe regime," said spokesman Obert Gutu.
By the time elections are held next year, "the electoral playing field should have been completely evened up, " he added.