You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
The military declared a 10pm until 5am curfew, suspended the constitution and told outgoing cabinet ministers to report to an army base in the north of the capital. Rival protest camps were ordered to disperse and media censored.
US Secretary of State John Kerry said there was no justification for a coup which would have "negative implications" for ties. The United States was reviewing its military and other assistance "consistent with US law".
Thailand is locked in a protracted power struggle between supporters of ousted former premier Thaksin Shinawatra and opponents backed by the royalist establishment that has polarised the country and battered its economy.
"In order for the situation to return to normal quickly and for society to love and be at peace again ... and to reform the political, economic and social structure, the military needs to take control of power," Prayuth said in the televised address.
The general made his broadcast after a meeting to which he had summoned the rival factions in the drawn-out political conflict, with the aim of finding a compromise to end six months of anti-government protests.
But no progress was made and Prayuth wound up the gathering by announcing he was seizing power, according to a participant.
The Thai armed forces have a long history of intervening in politics - there have been 18 previous successful or attempted coups since the country became a constitutional monarchy in 1932, most recently when Thaksin was deposed in 2006.
Hundreds of soldiers surrounded the meeting at Bangkok's Army Club shortly before the coup announcement and troops took away Suthep Thaugsuban, leader of the protests against the pro-Thaksin government.
Some political party leaders were also detained.
Prayuth assumed the duties and responsibilities of the prime minister, the military said.
SHOTS FIRED INTO AIR
The army ordered rival protest camps to break up and soldiers fired into the air to disperse thousands of pro-government "red shirt" activists gathered in Bangkok's western outskirts. The military detained at least one leader of the activists, said a spokesman for the group, Thanawut Wichaidit.
The protesters later left peacefully and the military laid on transport to take people away.
The army also ordered television and radio stations to halt normal programmes and broadcast its material, and banned gatherings of more than five people. It said it would suspend websites that spread false information or incited unrest.
Earlier, it warned people not to spread inflammatory material on social media.
The army had declared martial law on Tuesday, saying it was necessary to prevent violence.
Twenty-eight people have been killed and 700 injured since the anti-government protests erupted late last year.
"Martial law may have been to test the waters, the army gave the opposing camps a chance to negotiate a way out but I think the endgame was always the military taking over," said Kan Yuanyong of the Siam Intelligence Unit think-tank.
"The possibility of conflict is now much higher," he said. "Thaksin will fight back."
Former telecommunications tycoon Thaksin has lived in self-exile since 2008 to avoid a jail term for graft, but still commands the loyalty of legions of rural and urban poor and exerts a huge influence over politics, most recently through a government run by his sister, Yingluck Shinawatra.
He was not available for comment but a pro-Thaksin activist in his hometown of Chiang Mai said there was no immediate plan to protest.
"As of now we will not head to Bangkok, no plans. We will follow today's situation closely first," said Mahawon Kawang.
Kerry said he was disappointed and concerned by reports that political leaders had been detained, and called for their release.
"This act will have negative implications for the U.S.-Thai relationship, especially for our relationship with the Thai military," he said in a statement.
The Pentagon said it was reviewing its military assistance and engagements, including an ongoing exercise involving about 700 U.S. Marines and sailors.
Under U.S. law, no foreign aid may flow to a country whose duly elected head of government is deposed in a coup, but the language of the law gives the Obama administration some latitude in how to interpret it.
It would be unusual for the U.S. State Department to make any quick decision on whether such assistance had to be cut off.
There was condemnation from France and the United Nations human rights office.
Japan said the coup was regrettable and it called for a swift restoration of democracy. Australian Foreign Minister Julie Bishop said she was "gravely concerned" and warned tourists to be careful.
"EVERYONE MUST SIT STILL"
In a first round of talks on Wednesday, Prayuth had called on the two sides to agree on a compromise that would have hinged around the appointment of an interim prime minister, political reforms and the timing of an election.
But neither side backed down from their entrenched positions, participants said.
"As we cannot find a way to bring the country to peace and noone will back down I would like to announce that I will take power. Everyone must sit still," Prayuth told the meeting, according to one participant who declined to be identified.
Leaders of the ruling Puea Thai Party and the opposition Democrat Party, the Senate leader and the five-member Election Commission had joined the talks.
Yingluck was forced to step down as premier by a court two weeks ago, but her caretaker government, buffeted by six months of protests against it, had remained nominally in power.
Thailand's gross domestic product contracted 2.1 percent in January-March from the previous three months, largely because of the unrest, adding to fears it is stumbling into recession.
But weary investors have generally taken Thailand's frequent political upheavals in their stride, and analysts said the impact on markets in Southeast Asia's second largest economy might not be too severe.
Thailand's SET index closed before the coup announcement, ending 0.2 percent higher. The index is up 8 percent this year. The baht weakened to 32.54 to the dollar after the coup announcement, from 32.38 earlier.
The anti-government protesters want to rid the country of the influence of Thaksin, who they say is a corrupt crony capitalist who commandeered a fragile democracy and used taxpayers' money to buy votes with populist giveaways.
They wanted a "neutral" interim prime minister to oversee electoral reforms before any new vote.
The government and its supporters said a general election was the best way forward and it had proposed polls on Aug. 3, to be followed by reforms. It would probably win such a vote.