A state of emergency has been declared across the Thai capital of Bangkok and the surrounding areas, a day after protests cancelled the Asia Pacific summit in Pattaya.
The announcement came on Sunday as about 50 anti-government protestors broke into Bangkok's interior ministry.
Thai Prime Minister Abhisit Vejjajiva managed to escape from the ministry by car, Thai television stations reported.
Reports said soldiers had made no attempt at first to stop the protesters, supporters of former Prime Minister Thaksin Shinawatra who was ousted in a coup in 2006, but later troops fired warning shots into the air.
Police say the leader of Saturday's protest in Pattaya was detained as the prime minister vowed to prosecute the protesters whose campaign he said had tipped into illegality.
Police say Arisman Pongruengrong was detained at his home in Bangkok, and charged with inciting protesters to kidnap the prime minister and cause unrest.
Future ASEAN summit
ASEAN organisers hope the cancelled summit will go ahead in two months.
ASEAN deputy spokesperson Supachai Jaisamut says all the leaders that were due at the conference have safely left the country.
New Zealand Prime Minister John Key says it is obvious the Thai government did not have the security situation under control.
Mr Key and his aides flew out of Thailand on Saturday night after spending an entire day at Bangkok airport.
He said the next scheduled summit could still go ahead in October, but is unlikely to be in Thailand as originally planned.
The summit had been intended to bring together the 10 members of ASEAN (Brunei, Cambodia, Indonesia, Laos, Malaysia, Myanmar, the Philippines, Singapore, Thailand and Vietnam) plus China, Japan, South Korea, India, Australia and New Zealand, to discuss regional responses to the global economic crisis.
The meeting had already been postponed from last year after protestors blockaded international and domestic airports in Bangkok.
China deal not completed
The collapse of the Pattaya summit has derailed the conclusion of an agreement between China and ASEAN.
The deal would have created the world's largest free trade area, covering nearly two billion people.