Zimbabwe's former president Robert Mugabe and his wife have been granted immunity, the military said Thursday, allowing the couple to remain in the country.

Col. Overson Mugwisi, a spokesman for the Zimbabwean Defense Forces, told CNN that an agreement had been reached with Mugabe that included immunity and a guarantee of safety for him and his wife, Grace Mugabe.

Mugabe resigned on Tuesday, in a historic moment that brought his 37 years of oppressive rule to an end.

The former leader has been accused of waging a campaign of fear to remain in power for nearly four decades and human rights activists have long called for him to be brought to justice.

He was accused of ordering a string of massacres in the early- to mid-1980s in opposition strongholds to consolidate his power. Up to 20,000 people were killed, academics say.

He has also been accused of corruption to finance his lavish lifestyle, as his government drove the once-prosperous nation into economic ruin and poverty.

MORE: The devastating economic legacy of Robert Mugabe

Mugabe had spent a week negotiating his departure with the military since the country's army seized control in the capital, Harare, and placed the leader under house arrest.

In a long, drawn-out process, frustrated military officials gave into the demands for immunity and allowed the president to keep several of his properties, sources told CNN on Monday, before Mugabe stepped down.

Mugabe's former right-hand man, Emmerson Mnangagwa, returned to the country on Wednesday to take the reins as interim president, promising to take the nation into a "new and unfolding democracy." He spoke in front of throngs of supporters, but made no mention of Mugabe's future.

Mnangagwa is scheduled to be sworn in on Friday.

Will the military recede?

In Mnangagwa's remarks on Wednesday, he made clear that he played a role in the military's operation to remove Mugabe from power. He said he had been in "constant contact" with military chiefs throughout the operation.

The military was instrumental to Mugabe's demise, staging the apparent coup, then leading talks with Mugabe to allow him a dignified resignation.

The main opposition MDC-T party has raised concerns over what role the military might play ahead of next year's election, with Mnangagwa at the helm of the security forces.

The leader of the MDC-T, Morgan Tsvangirai, called on Mnangagwa to officially define the military's role.

"The generality of Zimbabwe, who have experienced brutalization, intimidation and violence, would be very skeptical if the role of the military is not properly defined," he told CNN's Christiane Amanpour on Thursday.

Tsvangirai also called for next year's elections to be free and fair. He has contested the presidency three times against Mugabe and in 2013 alleged widespread fraud after his defeat. It is widely alleged that Mugabe kept his iron grip on power by rigging the vote.

Mnangagwa's return has raised a sense of nervousness in Zimbabwe -- he is alleged to have been behind some of Mugabe's most ruthless policies and to many he represents the oppressive status quo.

Known as "The Crocodile" for his political cunning and longevity, Mnangagwa has been accused of orchestrating massacres in the 1980s, an allegation he denies.

In his interview with CNN, Tsvangirai looked forward to next year's elections and took the opportunity to reference Mnangagwa's dark past. He warned that the incoming President would struggle to abandon Mugabe's legacy.

"Knowing Emmerson Mnangawa, his character, he will have to work very hard to change his character so that he can define the future of the country and define his future as a democrat, as a reformer. That I doubt. But at the same time, he knows that he can cannot continue on the same path Mugabe has traveled and still expect the population to respect him," he said.

CNN's Schams Elwazer contributed to this report.