Thailand’s military has announced it is taking control of the government and has suspended the constitution.
In a TV statement, army chief Gen Prayuth Chan-ocha vowed to restore order and enact political reforms.
The cabinet has been told to report to the military, TV broadcasting is suspended and political gatherings are banned. A nationwide curfew will operate from 22:00 to 05:00 local time.
The coup follows months of political turmoil in Thailand.
On Tuesday the army imposed martial law. Talks were then held between the main political factions, but the army announced the coup on Thursday.
Key political figures, including opposition protest leader Suthep Thaugsuban and pro-government protest leader Jatuporn Prompan, were taken away from the talks venue after troops sealed off the area.
Troops fired into the air to disperse a pro-government protest camp on the outskirts of Bangkok but there are no reports of major violence.
The broadcast media have been told to suspend all normal programming.
Gen Prayuth said he had taken over power because “of the violence in Bangkok and many parts of the country that resulted in loss of innocent lives and property, [which] was likely to escalate”.
He added: “We ask the public not to panic and to carry on their lives normally.”
In a later a statement read on television the military said that “in order to run the country smoothly, [it has] suspended the constitution of 2007, except for the chapter on the monarchy”.
The statement said Gen Prayuth would head a ruling military body – the National Peace and Order Maintaining Council – but that the upper house of parliament and courts would continue to function.
The army has ordered acting PM Niwatthamrong Boonsongphaisan and his ministers to report to the military on Thursday “in order to keep peace and order”.
The TV statement also carried a ban on “political gatherings” of more than five people, adding: “Anyone who violates the ban will be subject to a one-year jail term, 10,000 baht ($307) fine, or both.”
The UN human rights office has urged the new Thai authorities “to take all necessary measures to ensure fundamental human rights are respected”.
The first curfew has now begun, but as the 22:00 (15:00 GMT) deadline loomed there was heavy traffic on the streets of the capital with people trying to get home.
The army has staged at least 12 coups since the end of the absolute monarchy in 1932.
The latest unrest began in the Thai capital late last year, when then-Prime Minister Yingluck Shinawatra dissolved the lower house of parliament.
Demonstrators have blockaded several areas of Bangkok for months.
Earlier this month, a court ordered Ms Yingluck’s removal for alleged abuse of power.
Thailand has faced a power struggle since Ms Yingluck’s brother, Thaksin Shinawatra, was ousted by the military as prime minister in 2006.
Mr Thaksin and Ms Yingluck have strong support in rural areas and among poorer voters.
Correspondents say they are hated by an urban and middle-class elite who accuse them of corruption.