Media playback is unsupported on your device Media caption The moment Jonah Fisher and other reporters realised a coup was under way

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.

Media playback is unsupported on your device Media caption Thailand's coup explained - in 60 seconds

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.

The BBC's Jonah Fisher, in Bangkok:

What we're hearing is that soldiers have moved rapidly to consolidate their position, moving in on the "red shirt" camp, the broad protest movement linked to the government, on the outskirts of Bangkok. They are also moving towards the anti-government demonstrators' camp in the centre of town.

A curfew has just been declared, so the military is obviously making efforts to make sure there is no immediate response to its announcement. Those people who voted for what is still the elected government here will feel extremely annoyed and frustrated by what has happened.

Most people are expecting the "red shirts" to rally now and are extremely concerned about the possibility of confrontation.

Why is Thailand under military rule?

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."

Media playback is unsupported on your device Media caption Footage showed the moment political leaders were driven away from the talks

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.

Image copyright AP Image caption Journalists were ushered away from the area where talks had been held

Image copyright Reuters Image caption Troops enter a pro-government protest camp in Nakhon Pathom province

Image copyright AFP Image caption Anti-government protesters pack up their camp in Bangkok ahead of the 22:00 curfew

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.

Yingluck removed

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.