Zimbabwe's President Emmerson Mnangagwa, centre, and his wife Auxillia, right, leave after the presidential inauguration ceremony in Harare. File picture: Ben Curtis/AP

Harare - Breaking into cheers and song, Zimbabwe's ruling party on Friday sealed the fate of Robert Mugabe, a man they had revered for decades but removed from power in dramatic scenes last month.

The Zanu PF party congress officially endorsed its Central Committee's decision to replace Mugabe with Emmerson Mnangagwa as its leader, and it endorsed Mnangagwa as its candidate for the 2018 elections. Mnangagwa was inaugurated as the country's new president last month, with the immediate challenge of reviving a shattered economy and removing himself from his longtime mentor's shadow.

Friday's meeting was the final step in Mugabe's fall from grace after the military put him under house arrest, hundreds of thousands rallied in the streets and lawmakers began impeachment proceedings. Under the growing pressure, the 93-year-old who had vowed to rule for life finally resigned. He had led the party since 1975 and the country since independence from white minority rule in 1980.

Images of Mugabe's face, usually plastered on delegates' dress and other paraphernalia, were conspicuously missing Friday, as was Mugabe himself. He flew to Malaysia and Singapore earlier this week to visit family and seek medical treatment in his first overseas trip since last month's events.

The 75-year-old Mnangagwa at his inauguration described Mugabe as a "father, comrade-in-arms and my leader," even though his firing by Mugabe as vice president early last month set the events in motion amid concerns that unpopular first lady Grace Mugabe might succeed him.

Mugabe's time was up the moment he surrendered power to his wife, some ruling party delegates said. Friday's congress endorsed Grace Mugabe's firing from the party.

Now Mnangagwa must find a way to revive the severely weakened economy and win over voters ahead of elections that according to the constitution should be held in July or August. He told Friday's gathering that the vote will be held as scheduled, without mentioning a date.

He also urged party faithful to refrain from violence in the elections, saying there is no opposition to talk about.

The opposition, shut out of Mnangagwa's Cabinet in favor of military and ruling party members, has joined the United States and others in the international community in urging Zimbabwe's new government to make sure the elections are democratic.

Mnangagwa, sanctioned by the U.S. years ago for his activities as a top Mugabe aide, said again Friday that the government will do all in its power to make sure the elections are "credible, free and fair."

Looking ahead to the economic challenges, he called on Thursday for longtime sanctions to be lifted to ease foreign investment and promised measures to make the once-prosperous southern African nation "a place where capital feels safe."

Associated Press