Myanmar's military has declared a state of emergency for a year and installed a former general as president, the military-owned Myawaddy television station announced on Monday.
A former general named Myint Swe, who was previously serving as vice president, has been installed as acting president.
However, under the state of emergency military commander-in-chief Min Aung Hlaing has effectively taken control.
The military announcement came hours after the country's de facto leader Aung San Suu Kyi and numerous other government officials, along with leaders of smaller parties, were detained in pre-dawn raids across the country.
There were reports of internet and phone lines going down on Monday as soldiers appeared on the streets in major cities.
Army trucks were parked in front of City Hall in Yangon and troops were seen in the country's capital, Naypyitaw.
The country had been gripped by fears of a coup for days amid escalating tensions between the military and the ruling National League for Democracy (NLD) party, with the army refusing to rule out taking over and suggesting it could revoke the constitution.
Students detained
Regional ministers and student activists were also among those detained, Wai Wai Nu, an activist from Myanmar’s Rohingya minority, said on Twitter.
The raids came just hours before a newly elected parliament was due to convene in Naypyitaw.
The military had called for a postponement of the new term after claiming to have uncovered potentially widespread voter fraud during the general election in November, though they did not provide any direct evidence.
Suu Kyi rejected the call for a delay and other requests during a high-level meeting with the military last week, according to The Irrawaddy news website, which quoted an unnamed source.
Local election observers said in a statement last week that they found no major irregularities during November’s poll, which the NLD won by a landslide.
"The results of the elections were credible and reflected the will of the majority of voters," the statement said.
NLD spokesman Myo Nyunt said, as he was confirming the detentions of Suu Kyi and other party officials, that he expected security personnel to detain him soon.
"I am waiting for their arrival now," he said. "I don’t think anyone can guess what will happen next."
Activists security
Brad Adams, Asia director at Human Rights Watch, said he feared for activists inside the country.
"We are especially concerned for the safety and security of activists and other critics of the military who may have been taken into custody," he said.
"The military should recognize that it will be held accountable for its actions, including any mistreatment in custody and excessive use of force. We urge concerned governments to speak out forcefully against the military’s actions and consider targeted sanctions against those responsible."
Myanmar spent almost five decades under military rule before beginning a political transition in 2010 that saw many political prisoners freed and ushered in partial civilian rule.
Suu Kyi, who spent 15 years under house arrest and is a Nobel Peace laureate, was among those freed.
She came to power in the country's freest election in decades in 2015 amid a wave of intense optimism sparking widespread hopes for a new democratic era.
She was barred from becoming president under a widely opposed 2008 constitution written by the military, but had been serving as state counsellor, a role akin to prime minister which was created to help her lead through a puppet president.