President Robert Mugabe of Zimbabwe

Harare - President Robert Mugabe, who has ruled Zimbabwe for close to four decades, was under house arrest in the capital Harare after the military took control, plunging the country into political turmoil.

In what appeared to be a coup, the military took control of Mugabe's offices, parliament, the airport and the state broadcaster in the early hours of Wednesday.

"Robert Mugabe and his family's safety is guaranteed," a military spokesman said, stating that the army was only "targeting criminals" in the administration.

Mugabe was "confined to his home" but "fine," South African President Jacob Zuma said after speaking on the telephone to the 93-year-old who has ruled Zimbabwe with an iron fist for 37 years.

Read: Grace Mugabe has fled #Zimbabwe - report

Zuma urged Zimbabwe's military not to make "unconstitutional changes of government" and asked that the military and government "resolve the political impasse amicably," while calling for "calm and restraint."

On Wednesday evening, Harare's residents were seemingly going about their daily business despite the uncertainty - and the presence of soldiers on the airport road.

One veteran Zimbabwe journalist said he had even sensed some jubilation, recounting how youth at a bus stop had given the thumbs up to a passing army convoy.

In its coverage Wednesday night, state broadcaster ZBC was granting more airtime to sports and a report on World Diabetes Day - there was little about the political upheaval, apart from the military line that Mugabe was fine.

Also read: #Zimbabwe: Zuma says Mugabe under house arrest but is 'fine'

Many Zimbabweans have long wanted to see the back of Mugabe, who has been accused of election-rigging, numerous human rights abuses, and running the country's once vibrant economy into the ground.

However, until recent events it looked likely the former liberation hero would die in office, with his politically ambitious wife, Grace Mugabe, waiting in the wings to continue the Mugabe dynasty.

Grace Mugabe - jokingly referred to among Zimbabweans as "Disgrace" for her penchant for high-end shopping and volatile behaviour - has proved highly divisive in her husband's now faction-ridden Zanu-PF party.

Zimbabwe's unravelling began last week when Mugabe fired his longtime deputy Emmerson Mnangagwa, who many in the party had seen as his most suitable successor.

Mnangagwa, nicknamed "The Crocodile," is considered a ruthless political operator and has been locked for months in a vicious power struggle with the first lady.

Read more: Who is Emmerson "The Crocodile" Mnangagwa?

Elections are due to be held in Zimbabwe next year, with Mugabe having vowed to contest them despite his age.

The move to seize power comes two days after top army general Constantino Chiwenga warned Mugabe the military would "step in" if he continued his purge of Mnangagwa's faction.

Finance Minister Ignatius Chombo, who counts as a supporter of Grace Mugabe, was detained by soldiers in his Harare home early Wednesday, eyewitnesses told dpa.

The electric front gate of the minister's house had been forcibly removed.

The secretary general of the influential War Veterans Association, Victor Matemadanda, said Wednesday that Mugabe should be removed as Zimbabwe's president and as the leader of the ruling Zanu-PF party.

"There should be a commission of inquiry into the crimes he committed while he was in leadership," Matemadanda added.

The veterans who fought in the liberation struggle against white minority rule were staunch Mugabe supporters for decades - but have recently thrown their support behind Mnangagwa.

"Mugabe's 37-year absolute grip on power is over. Whether or not Mugabe is allowed to retain his title, the military is now firmly in control of power structures in Harare," said analyst Charles Laurie, from risk consultancy firm Verisk Maplecroft.

You may also want to read: Army takes over #Zimbabwe: What we know

"The military will most likely find a face-saving way for Mugabe to leave the political stage," Laurie added.

The army is expected to negotiate a power transfer to Mnangagwa, according to Theophilus Acheampong, researcher at international analytics firm IHR Markit. 

"Mnangagwa is likely to lead a transitional government, which will likely be composed of his allies," said Acheampong.

The military has continued to deny it is carrying out a coup.

"We wish to make it abundantly clear that this is not a military takeover of government," said army spokesman Sibusiso Moyo, adding that the army was "only targeting criminals" who are "causing social and economic suffering."

"As soon as we have accomplished our mission we expect that the situation will return to normalcy," Moyo said.

While there was initially a state media blackout, The Herald newspaper, a government mouthpiece, published a late edition Wednesday denying that events amounted to a coup.

The US embassy has urged its citizens in Zimbabwe to "shelter in place" and said it had closed due to the "ongoing public uncertainty." Britain also advised its citizens to stay at home.

The Southern African Development Community is sending two special envoys to Zimbabwe - the South African defence minister and minister of state security - to meet with Mugabe and the military.