Zimbabwe's military has placed President Robert Mugabe under house arrest in the capital Harare, South African President Jacob Zuma says.
Troops are patrolling the capital, Harare, after they seized state TV and said they were targeting "criminals".
The move may be a bid to replace Mr Mugabe with his sacked deputy, Emmerson Mnangagwa, BBC correspondents say.
Mr Mnangagwa's dismissal last week left Mr Mugabe's wife Grace as the president's likely successor.
Heavy gun and artillery fire could be heard in northern parts of Harare early on Wednesday.
Mr Mugabe, 93, has dominated the impoverished country's political scene since it gained independence from the UK in 1980.
The UK Foreign Office advised Britons "currently in Harare to remain safely at home or in their accommodation until the situation becomes clearer", while the US embassy in Harare advised US citizens in Zimbabwe to "shelter in place" until further notice.
China, Zimbabwe's biggest trading partner, says it is closely watching the situation and hopes that the relevant parties can properly handle their internal affairs.
What do we know of Mr Mugabe's situation?
The firing heard during the early morning came from Harare's northern suburbs, where Mr Mugabe and a number of government officials live, the BBC's Shingai Nyoka reports from Harare.
In a statement, Mr Zuma's office said: "President Zuma spoke to President Robert Mugabe earlier today who indicated that he was confined to his home but said that he was fine."
A Zimbabwean army officer, Maj Gen Sibusiso Moyo, went on TV after the takeover to say Mr Mugabe and his family were "safe and sound and their security is guaranteed".
How did the military justify its move?
"We are only targeting criminals around him who are committing crimes... that are causing social and economic suffering in the country," Maj Gen Moyo said, reading out a statement.
Troops are patrolling Harare
"As soon as we have accomplished our mission, we expect that the situation will return to normalcy."
Other key points made by Maj Gen Moyo were:
- Citizens should remain calm and limit unnecessary movement
- The military assures the Zimbabwean judiciary that its independence is guaranteed
- Security services should "co-operate for the good of our country" and any provocation would "be met with an appropriate response"
- All leave for the defence forces is cancelled and personnel should return to barracks immediately
It is not clear who is leading the military action.
Army chief Gen Constantino Chiwenga, who visited China last week, said on Monday the army was prepared to act to end purges within the ruling Zanu-PF party.
An extraordinary gamble
By Andrew Harding, BBC Southern Africa correspondent
A quick show of military force, a few arrests... and then what?
These are, of course, unpredictable times for Zimbabwe and yet there is a chance that the army's extraordinary overnight gamble will pay off, and that President Robert Mugabe, humiliated and powerless, will nonetheless be allowed to retire with at least the pretence of dignity.
It is important to remember that Mr Mugabe is not being challenged by the Western governments he has warned against for decades, or by Zimbabwe's political opposition, or by a mass uprising against economic hardship.
This is, fundamentally, an internal power struggle within Zanu-PF and whoever emerges victorious can expect a newly purged party to fall, obediently, into line.
Mr Mugabe's mistake, at 93, was to assume he was still powerful enough to build a dynasty to back his wife, Grace, to succeed him.
Instead, his once loyal deputy, Emerson Mnangagwa, may be poised to take control. If so, many foreign governments are likely to give him the benefit of the doubt and hope he can rescue Zimbabwe from years of misrule.
Has anyone else been detained?
A government source told Reuters news agency that Finance Minister Ignatius Chombo was being held.
He is a leading member of a Zanu-PF faction led by Grace Mugabe, 52.
Is this a coup?
Alex Magaisa, former adviser to Zimbabwean opposition leader Morgan Tsvangirai, told the BBC: "They have decided not to call it a coup because they know that a coup does not sell, it will be condemned.
General Chiwenga had warned of a military takeover
"But as far as authority is concerned it seems very clear that President Mugabe is now just a president in name and authority is now residing in the military."
Zanu-PF had accused Gen Chiwenga of "treasonable conduct" after he issued his warning that the army might intervene.
What was the political situation before the army acted?
Grace Mugabe is seen as a potential successor to her elderly husband
Emmerson Mnangagwa is seen here at a recent funeral
The rivalry between Mrs Mugabe and Mr Mnangagwa split Zanu-PF.
Gen Chiwenga is a close ally of Mr Mnangagwa and both are veterans of the 1970s war which ended white minority rule.
The leader of the war veterans, Chris Mutsvangwa, welcomed the military move, telling Reuters: "This is a correction of a state that was careening off the cliff.
"It's the end of a very painful and sad chapter in the history of a young nation, in which a dictator, as he became old, surrendered his court to a gang of thieves around his wife."
Have your say
More World Headlines
- IMF says optimism in South Africa's economic recovery fading
- France's Macron: Europe must unite to prevent 'global chaos'
- Rescued migrants refuse to leave ship taking them to Libya
- Climate protests shut down five London bridges
- S. African president says he was wrong about son's payment
- Theresa May: Brexit won't be easier if I'm ousted
- Central African Republic extradites ex-militia leader 'Rambo'
- Jamal Khashoggi: CIA 'blames Saudi prince for murder'
- Cape Town pours alcohol down the drain
- At least 42 killed in Zimbabwe bus fire
- Symbolic funeral services for murdered Jamal Khashoggi
- US to cut Africom troops amid focus on Russia and China
- Trump ordered to restore CNN reporter Jim Acosta's access
- Trump attacks Mueller's Russia inquiry as 'absolutely nuts'
- Carmakers lure ride-hailer, delivery drivers in Africa