Harare, Zimbabwe (CNN) Robert Mugabe's former right-hand man, Emmerson Mnangagwa, will be sworn in as interim President on Friday, a day after Mugabe and his wife were granted immunity, allowing the couple to remain in the country.

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

Mnangagwa, returned to the country on Wednesday to take the reins , promising to lead the nation into a "new and unfolding democracy." He spoke in front of throngs of supporters, but made no mention of Mugabe's future.

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

Robert Mugabe: What you need to know

Robert Mugabe: What you need to know 01:58

Robert Mugabe: What you need to know

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.

Robert Mugabe kisses his wife, Grace Mugabe, at Independence Day celebrations in Harare on April 18, 2017.

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 in to the demands for immunity and allowed the President to keep several of his properties, sources told CNN on Monday, before Mugabe stepped down.

JUST WATCHED Former PM: Mnangagwa must differ from Mugabe Replay More Videos ... MUST WATCH Former PM: Mnangagwa must differ from Mugabe 00:35

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. He is scheduled to address Zimbabweans after his swearing in.

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.

A supporter holds up a toy to welcome Emmerson Mnangagwa, known as "The Crocodile," back to the country on Wednesday in Harare.

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.

JUST WATCHED Fmr. Zimbabwe PM: Mnangagwa has to earn trust Replay More Videos ... MUST WATCH Fmr. Zimbabwe PM: Mnangagwa has to earn trust 07:01

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 Mnangagwa, 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.

US reaction

It was sad that Mugabe stayed in office as long as he did, US Ambassador to Zimbabwe Harry K. Thomas Jr. told CNN's David McKenzie.

Thomas said Mugabe was leader for "far too long" and had stopped engaging in democratic principles.

"We were pleased to see the outpouring in the streets; people are talking now, all over, you can hear their opinion -- whether it is golf caddies or women in markets, they are happy. They were, as people told me, suppressed, not stupid," Thomas said.

The United States' response to Mnangagwa will depend how he behaves in office, Thomas said. Mnangagwa is under US sanctions.

"This is a new day, this is an opportunity for him and his Cabinet to live up to the wonderful 2013 Zimbabwean constitution. And that is what we will tell them. It is your constitution, it is democratic, it is something you endorsed when you were minister of justice and later as vice president. This is for your people. So live up to it and the United States will find a way to partner," Thomas said.