One person died after a suspected car bomb exploded near the parliament
Troops are on the streets of Bangkok after its worst anti-government protests for 16 years left at least two dead and hundreds injured.
Demonstrators had set up a blockade outside the parliament building, which Prime Minister Somchai Wongsawat escaped by climbing over a fence.
The activists were trying to stop the inauguration of a government they say is run by ousted PM Thaksin Shinawatra.
But as troops moved in, protesters pulled back from the blockade.
The appearance of troops outside parliament is a clear sign that the government is struggling to maintain its authority, says the BBC's Jonathan Head in Bangkok.
The demonstrators - from the staunchly royalist People's Alliance for Democracy (PAD) - have been occupying the grounds of government buildings for weeks, but until Tuesday their demonstration had been largely peaceful.
An alliance of conservative and staunchly royalist academics, activists and business people, the PAD has proved to be a well organised and tactically savvy movement, our correspondent adds.
Clashes in the streets of the Thai capital Bangkok
Several thousand PAD protesters broke out of the compound where they had been staying and marched to the parliament.
They tried to seal off the building by putting up barriers of old tyres and barbed wire.
Police fired volleys of tear gas in an unsuccessful attempt to disperse the demonstrators and around 380 people - including eight police officers who were reportedly shot or stabbed - were injured in ensuing clashes.
The protesters later regrouped, locking some lawmakers inside the building and cutting off the power supply.
Amid the worst street violence since pro-democracy activists challenged Thailand's army in 1992, one person was killed when a suspected car bomb exploded outside the building. A woman also later died, reportedly of chest wounds.
Troops were eventually brought in to help the police and, as army commanders took pains to ensure the public there would be no coup, most protesters pulled back to their camp in Government House.
Forced to flee
The violence prompted the resignation of Deputy Prime Minister Chavalit Yongchaiyudh, the government's chief negotiator with the PAD, who said police had failed to exercise the restraint he had requested.
Anti-government protesters were involved in clashes with police
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.