Zimbabwe’s military has placed President Robert Mugabe under house arrest in the capital Harare, South African President Jacob Zuma says.
Mr Mugabe told Mr Zuma in a phone call that he was fine, the South African leader’s office said.
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.
Latest reaction and updates
What we know so far
The rise of Grace Mugabe
Mr Mugabe, 93, has dominated the country’s political scene since it gained independence from the UK in 1980.
How the drama unfolded
After days of tension and rumour, soldiers seized the state broadcaster ZBC late on Tuesday.
A Zimbabwean army officer, Major General Sibusiso Moyo, went on air and denied there was a coup, but said the military was targeting “criminals” around President Mugabe.
Maj Gen Moyo also said Mr Mugabe and his family were “safe and sound and their security is guaranteed”. It is not clear who is leading the military action.
Since then military vehicles have been out on the streets of Harare, while gunfire has been heard from northern suburbs where Mr Mugabe and a number of government officials live.
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.”
How we got here
Media captionWho is Grace Mugabe?
At heart is a power struggle over who succeeds Mr Mugabe. The rivalry between his wife Grace and Mr Mnangagwa has split the governing Zanu-PF.
Did Mugabe go too far?
Following a call from Mrs Mugabe, Mr Mnangagwa was removed from the vice-presidency earlier this month.
But on Monday, army chief Gen Constantino Chiwenga said the army was prepared to act to end purges within Zanu-PF.
Media captionWho is the “crocodile” and is he behind the military takeover in Zimbabwe?
Gen Chiwenga is a close ally of Mr Mnangagwa and both are veterans of the 1970s war which ended white minority rule.
One of the leading members of the Zanu-PF faction led by Grace Mugabe, Finance Minister Ignatius Chombo, is being detained, a government source told Reuters.