A faction of the Thai military led by the army chief says it has overthrown Prime Minister Thaksin Shinawatra.
Soldiers have entered the prime minister's offices in Government House and tanks have surrounded the building.
Mr Thaksin, who is at the UN in New York, has declared a state of emergency and said he had removed the army chief.
A government spokesman insisted the coup "could not succeed", and told the Reuters news agency that the government was still in control.
The spokesman said it had not been decided when the prime minister would return home from the UN.
However, in a television broadcast the leadership of the armed forces said it had taken control of Bangkok, declared a nationwide martial law and ordered all troops to return to their bases.
The so-called "Council of Political Reform" they announced is apparently loyal to sacked military commander Lt Gen Sonthi Boonyaratglin and has declared its loyalty to the king.
However, the BBC's Kate McGeown in Bangkok says King Bhumibol is held in high esteem by all Thais, and the declaration of loyalty does not necessarily imply that he backs the takeover attempt.
An army-owned TV station is showing images of the royal family and songs linked in the past with military coups.
BBC World, CNN and other international news channels have been taken off the air, readers in Thailand told the BBC News website by email.
Our correspondent says low-level rumours of a possible coup have been circulating for weeks.
Political impasse
There has been pressure growing on the prime minister to resign, including from groups close to King Bhumibol, following a political impasse in which April's general election was declared invalid, says the BBC's correspondent Jonathan Head in Bangkok.
But it had been thought that Thailand was making progress towards holding another election later in the year, our correspondent says.
Witnesses said several hundred troops were posted at key points around Bangkok, including at government installations and major intersections.
Russell Miles emailed the BBC News website to say there were troops "dressed in Swat-style gear strolling around" near Government House, and "a tense, but fairly controlled atmosphere".
He said: "We saw a group of blokes bundling a cameraman and another chap into a van. We are taking photos, but not out in the open."
At the United Nations, where the annual General Assembly is under way, it was announced that the agenda had been changed to allow Mr Thaksin to address it in the coming hours.
--------------------
Source:
BBC NEWS | Asia-Pacific | Thai PM 'overthrown in army coup'