No matter what happens, this appears to be a watershed moment for Zimbabwe and southern Africa, which have suffered from the tumult of Mugabe's reign, even as his hold on power sometimes seemed unshakable.
Zimbabweans awoke early Wednesday to a televised announcement from an army general promising that there was "not a military takeover," although Mugabe had been detained and armored vehicles were rolling into Harare, the capital.
Despite the assurances, the events bore all the signs of a coup. Troops were stationed around the city. The army took over the television station. The army spokesman, Maj. Gen. Sibusiso Moyo, said in his televised statement that "criminals" in Mugabe's regime were being targeted. Although there was little indication of violence by Wednesday night, many residents of the capital remained paralyzed — unsure whether they should celebrate Mugabe's ouster or prepare themselves for a new era of undemocratic rule.
The commander of Zimbabwe's military forces, Gen. Constantino Chiwenga, made the move as a struggle over who will succeed the country's elderly leader came to a head.
Mugabe led the country to independence from Britain in 1980, fighting in a guerrilla war that put an end to white minority rule. Upon becoming president, he galvanized the population with fiery speeches promising that "Zimbabwe will never be a colony again."
The scene in Zimbabwe as Mugabe resigns as president after 37 years
But that mantra lost much of its power in recent years, as Mugabe's presidency was marred by allegations of corruption, nepotism and repression. Zimbabwe went from being one of Africa's wealthiest nations to a country reeling under one of the highest inflation rates in modern history, its currency so devalued that it had to print a $100 billion note.
Mugabe recently purged some key officials from the ruling party, ZANU-PF, paving the way for his 52-year-old spouse, Grace, to succeed him. Many see that move as a major miscalculation, alienating Mugabe from the civilians and military leaders on whom he had long depended.
As of Wednesday night, the fate of Mugabe and his wife was unclear. Neither had released a statement.
South African President Jacob Zuma, who announced that he was sending high-level envoys to Harare, said that he had spoken to Mugabe and that he is "fine" — albeit confined to his home.
"Mugabe and his family are safe and sound, and their security is guaranteed," Moyo, the Zimbabwean general, said in the televised statement. An armored vehicle blocked the road in front of Mugabe's offices as soldiers milled around.
"We are only targeting criminals around him who are committing crimes that are causing social and economic suffering," Moyo continued.
The statement was played over and over on state television and radio, but no more details were provided. Rumors spread that a number of cabinet ministers had been arrested. At least one, Finance Minister Ignatius Chombo, was taken from his home by soldiers, according to an aide.
But the military remained tight-lipped about Mugabe, his wife and other members of Mugabe's inner circle.
"We are not saying these names now," said Overson Mugwisi, a spokesman for the Zimbabwe Defense Forces.
World leaders were monitoring the situation. The British foreign secretary, Boris Johnson, said that "nobody wants simply to see the transition from one unelected tyrant to a next."
The U.S. State Department refrained from calling the action a coup but said Washington was "concerned by recent actions taken by Zimbabwe's military forces" and called on authorities to exercise restraint.
For decades, Mugabe had a reputation as an unwavering critic of many Western policies and international institutions. His supporters hailed him for actions such as the seizure of white-owned farms. Although the farms were meant to be given to black families, many ended up in the hands of Mugabe's close associates, and within years a large number had fallen fallow because their new owners had no background or interest in farming.
On the streets of Harare, the news of the military takeover was greeted with cautious optimism by many.
"We are happy that we are going to have another leader," said a man in Harare's Chitungwiza neighborhood who called himself Yemurai. "Even if it's going to be another dictator, we accept a new one. Look, we are jobless, hungry and poverty-stricken. All we want is something different." Like most people interviewed, he spoke on the condition that his full name not be used.
But some people worried that the military intervention could lead to violence.
"This is a disaster," said Baxon, a man from the Glen View area. "Solving one problem by creating another. We don't want another war, but it seems we are headed that way. We have heard there are people in the army not in agreement with what Chiwenga did."
But there were mounting signs that Mugabe's former allies were quickly turning against him.
Victor Matemadanda, secretary general of the powerful War Veterans Association, thanked Chiwenga for intervening and said Mugabe should be dismissed.
"We will be recalling President Robert Mugabe as the first secretary of the party and the head of state for the crimes he has committed," Matemadanda said in a news conference.
In Harare's central business district, residents said all seemed normal.
Across the country, Zimbabweans exchanged frantic text messages asking for updates, debating whether Mugabe had finally been toppled.
Political analyst Mike Mavura said it was important for the military to say this was not a coup for reasons of international legitimacy.
"We are not in the 1960s and 1970s anymore, when coups in Africa were left, right and center — I think they are trying very hard to appear progressive," he said. "However, of interest to democracy, the elections scheduled for next year, will they take place?"
Zimbabwe's political crisis reached a boiling point last week with Mugabe's dismissal of Vice President Emmerson Mnangagwa, clearing the way for Mugabe's wife to succeed the leader.
Mugabe told supporters he had dismissed Mnangagwa for disloyalty and disrespect, as well as using witchcraft to take power. Mnangagwa later fled to South Africa.
The move exacerbated divisions in the ZANU-PF party, where the youth faction is firmly on Grace Mugabe's side, while many older veterans of the struggle against white rule look to Mnangagwa. As a former defense minister, Mnangagwa has strong support in the military.
Political commentator Maxwell Saungweme said by phone that the military will probably try to pressure Mugabe to step down in favor of Mnangagwa as acting president.
"But this plan may not pan out, as Mugabe might resist this. So the whole thing may be messy," he warned.
Didymus Mutasa, a former presidential affairs minister who was fired by Mugabe in 2014, said he hoped that the military takeover would "help us start on a democratic process."
Zimbabwe was once a breadbasket for the region, but its economy and especially the agricultural sector have suffered in recent years.
Meanwhile, Mugabe was seen as being increasingly under the influence of his wife, who is also known as "Gucci Grace" for the rumored extravagance of her foreign shopping trips. The country's per-capita gross domestic product is $1,008, according to the World Bank.
In recent weeks, there have been signs of an increased sensitivity to criticism of the government. Four people were detained for booing Grace Mugabe at a rally, and an American woman was arrested for allegedly tweeting insulting comments about Mugabe.
Schemm reported from Addis Ababa, Ethiopia. Brian Murphy in Washington contributed to this report.