Zimbabwe: Robert Mugabe confined to home as army takes control – as it happened:
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.
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.
Special envoys from the Southern African Development Community would be sent to Zimbabwe, he added.A Zimbabwean army officer, Major General 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.
"As soon as we have accomplished our mission, we expect that the situation will return to normalcy."
Maj Gen Moyo also called on the security services to co-operate "for the good" of the country and warned that any provocation would "be met with an appropriate response".
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.
In Harare, some people greeted the news with delight. "We are going to have a good life, we are looking forward to Christmas, because of what has happened," one woman told BBC News.
"I want to thank the general for removing this tyrant," said a man. "He was ruling the country as if it belonged to his family."