The country's leader, Aung San Suu Kyi, and members of her party are thought to be under house arrest.
Myanmar, also known as Burma, is in Southeast Asia and neighbours Thailand, Laos, Bangladesh, China and India.
It has a population of about 54 million, most of whom speak Burmese, although other languages are also spoken. The biggest city is Yangon (Rangoon) but the capital is Nay Pyi Taw.
The main religion is Buddhism. There are many ethnic groups in the country, including the Rohingya Muslims.
The ruling military changed the country's name from Burma to Myanmar in 1989, a year after thousands of people were killed in a crackdown on a popular uprising.
The country was ruled by the armed forces from 1962 until 2011, when a new government began ushering in a return to civilian rule.
The military has once more taken over the country, declaring a year-long state of emergency.
It seized control following a general election which Ms Suu Kyi's National League for Democracy (NLD) party won by a landslide.
The armed forces had backed the opposition, who were demanding a re-run of the vote, claiming widespread fraud.
The election commission said there was no evidence to support these claims.
The coup was staged as a new session of parliament was set to open.
The military says that power has been handed over to commander-in-chief Min Aung Hlaing.
He has long wielded significant political influence, successfully maintaining the power of the Tatmadaw - Myanmar's military - even as the country transitioned towards democracy.
He has received international condemnation and sanctions for his alleged role in the military's attacks on ethnic minorities.
The military has already replaced numerous ministers and deputies, including in finance, health, the interior and foreign affairs.
Aung San Suu Kyi became world-famous in the 1990s for campaigning to restore democracy in Myanmar.
She spent nearly 15 years in detention between 1989 and 2010 after organising rallies calling for peaceful democratic reform and free elections.
She was awarded the Nobel Peace Prize while under house arrest in 1991.
In 2015, she led her NLD party to victory in Myanmar's first openly contested election in 25 years.
Ms Suu Kyi's international reputation has suffered greatly as a result of Myanmar's treatment of the Rohingya minority group.
Myanmar considers them illegal immigrants and denies them citizenship.
Over decades, many have fled to escape persecution.
Thousands of Rohingyas were killed and more than 700,000 fled to Bangladesh following an army crackdown in 2017.
Ms Suu Kyi appeared before the International Court of Justice in 2019, where she denied the military had committed genocide.
The EU, UK and United Nations are among those to have condemned the military takeover.
UK Prime Minister Boris Johnson said the "vote of the people must be respected".
US President Joe Biden has threatened to reinstate sanctions on Myanmar.
But not everyone has reacted in this way.
China, which has previously opposed international intervention in Myanmar, urged all sides in the country to "resolve differences". Its Xinhua news agency described the changes as a "cabinet reshuffle".
Other countries in the region, including Cambodia, Thailand and the Philippines, have said it is an "internal matter".
Ms Suu Kyi has urged her supporters to "protest against the coup", but the streets of Myanmar are quiet.
An NLD politician told the AP news agency the party was not planning street protests, but working to "settle the problem peacefully".
Medics working in government hospitals are reported as saying they will stop work this week to push for the release of Ms Suu Kyi. Pictures on social media show some wearing black ribbons in protest.
We simply attempt to be fearful when others are greedy and to be greedy only when others are fearful.