This can happen in any country socialist or democratic.
This can happen in America and any other free country.
The military is there to protect the country from outside invaders and inside enemies.
If the military sees that there is a threat to the government or the government lost control then they have the right to take over the country by force until order is brought back and when order is brought back they hand control back to the government.
A coup such as this - when a government, even a democratically elected one, is displaced by armed force - is more likely to happen in a republic than a constitutional monarchy because in a constitutional monarchy, the non-political monarch is Head of the Armed Forces, so a would-be dictator CANNOT control the Armed Forces, whereas in a republic the Head of Government is usually Head of the Armed Forces.
Another reason why constitutional monarchy is a better system of governance than a republic, no matter what jealous republicans say.
The last coup in Britain occurred way back in 1688,
when the protestant William of Orange deposed the catholic King James II to establish parliamentary democracy.
We in Britain can be thankful that our constitutional monarchy has given us political stability that probably no other country on the planet can match.
"We should all bear carefully in mind the constitutional safeguards inherent in the monarchy:
While the Queen occupies the highest office of state, no one can take over the government. While she is head of the law, no politician can take over the courts. While she is ultimately in command of the Armed Forces, no would-be dictator can take over the Army.
The Queen’s only power, in short, is to deny power to anyone else. Any attempt to tamper with the royal prerogative must be firmly resisted."
D G O Hughes, letter to The Daily Telegraph, 1st September 1998
.
**********************************
The most odious and repressive regimes in the 20th century have ‘people’s’ or ‘democratic’ in their names, and that is no accident. The theoretical basis for democracy, egalitarianism, was responsible for the worst excesses of the French revolution; little blood was shed in support of liberty and fraternity. Had the hereditary principle been upheld in places as diverse as Libya, Greece, Albania, even Russia, had those monarchies not been overthrown and replaced by monstrous people's regimes, the very lives, never mind prosperity, of those peoples would have been saved.
It is not necessary to try to prove the superiority of the hereditary principle over mass democracy, nor to spend much time over democracy’s supposed greatest achievement - the US.
Peter Scanlan, letter to Country Life, 4th February 1999.
*****************************************************
Britain’s constitutional monarchy is one of its greatest strengths as well as one of its greatest attractions. The monarch is detached from party politics in a way no president could be. For years, the existence of a monarchy was the guarantee that no would-be dictator could stage a coup by deploying troops, as the monarch controls the armed services. No latter-day Cromwell could win power by force. We have had no civil war since Cromwell’s and much of that is due to having had a constitutional monarchy as a focus of loyalty.
Ann Widdecombe MP, BBC History Magazine, September 2000.