Updated

Thailand's prime minister narrowly escaped a savage attack and rioting erupted in Bangkok as protesters commandeered public buses and swarmed triumphantly over military vehicles in unchecked defiance after the government declared a state of emergency.

Bands of red-shirted anti-government protesters roamed areas of the Thai capital, with some smashing a car carrying Prime Minister Abhisit Vejjajiva and others beating up motorists who hurled insults at them.

At least 10 intersections were occupied by the protesters, who used buses to barricade several major roads, spawning massive traffic jams.

The emergency decree bans gatherings of more than five people, forbids news reports considered threatening to public order and allows the government to call up military troops to quell unrest.

But there were signs that the government might not be able to contain the protesters.

Associated Press reporters saw demonstrators swarm over two of three armored personnel carriers outside a shopping mall in downtown Bangkok, waving flags in celebration. An old lady atop one of the vehicles screamed "Democracy!" before the protesters directed the soldiers to drive them back to a military camp.

Outside the Interior Ministry, a furious mob attacked Abhisit's car with poles, stones and even flower pots as it slowly made its escape. Police in riot gear nearby did nothing.

"I believe that the people have seen what happened to me. They have seen that the protesters were trying to hurt me and smash the car," Abhisit said in a television appearance.

"It's total chaos. It is scary and the military are doing nothing. Who can guarantee our safety?" said Martin Liu, a 36-year-old American tourist near the armored vehicles.

Demonstrators from the United Front for Democracy Against Dictatorship say Abhisit's four-month-old government took power illegitimately and want new elections. They also accuse the country's elite — the military, judiciary and other unelected officials — of undermining democracy by interfering in politics.

Army spokesman Col. Sansern Kaewkamnerd said soldiers and police were being moved to more than 50 key points in the city, including bus and railway stations. He said the military presence was not a sign of an imminent coup — a common feature of Thai political history.

About 400 soldiers armed with rifles ringed Chitralada Palace, the Bangkok residence of King Bhumibol Adulyadej. But the monarch was believed to be at his seaside palace.

Sathit Wongnogntoey, a minister in the prime minister's office, said the government had blocked broadcasts from the protesters' radio station in accordance with the emergency decree.

"We told our people to be ready and be prepared," said Jakrapop Penkair, a key protest leader. If the military uses force, "the people will be our weapon. We are not scared. Abhisit must be ousted immediately," he said.

Abhisit said the government imposed the state of emergency because "we want to return the country to normalcy."

"The government will try every way to prevent further damage. I ask the people to support the government in order to restore order in the country," he said on national television.

Abhisit also vowed swift legal action against protesters who stormed the venue of an East Asian Summit in the beach resort of Pattaya on Saturday, forcing the summit's cancellation. Thai authorities had to evacuate the Asian leaders by helicopter.

A protest leader who spearheaded Saturday's demonstrations, Arisman Pongruengrong, was taken into custody Sunday and flown by helicopter to a military camp for questioning, said police spokesman Maj. Gen. Suport Pansua.

Protests were also reported in areas of northern and northeastern Thailand, with one group threatening to blockade the main bridge linking Laos and Thailand across the Mekong River.

Editorials in Bangkok newspapers Sunday lashed out at both the protesters for destroying Thailand's international reputation and the government for a massive security breakdown.

Tourism Council of Thailand Chairman Kongkrit Hiranyakit predicted that the country would lose at least 200 billion baht ($5.6 billion) as foreign tourists shunned the country.

"Some tourists want out quickly for fear that protesters may go on to block the airport like last year. Incoming tourists are questioning security and canceling bookings," he said.

At Saturday's summit, more than 1,000 demonstrators broke through a wall of unarmed soldiers, smashed through the convention center's glass doors and ran through the building, blowing horns, waving Thai flags and shouting demands for Abhisit to resign.

They declared victory after Abhisit canceled the summit, where leaders of regional powers China, Japan and India, and the U.N. secretary-general and president of the World Bank, planned to discuss the global financial crisis.

China's Premier Wen Jiabao had planned to announce generous aid packages at the summit, including a $10 billion fund for investment in infrastructure, the official Xinhua News Agency reported in Beijing.

Political tensions have simmered since former Prime Minister Thaksin Shinawatra was removed by a military coup in 2006. Thaksin opponents marched last year to remove Thaksin's allies from power, even shutting down the country's main international airport for about a week in November. After a court ordered the removal of the previous pro-Thaksin government for election fraud, Abhisit was appointed by Parliament in December — sparking Thaksin supporters to take to the streets.

Their numbers grew to 100,000 in Bangkok last week.

Abhisit imposed a state of emergency in Pattaya after the summit was overrun Saturday, but revoked it six hours later after the Asian leaders were safely airlifted to a nearby military airport.

The ongoing protests could prompt the military to intervene — a high possibility in a country that has experienced 18 military coups since the 1930s.

"The situation has gotten completely out of hand. Violence and bloodshed is very much possible" if Abhisit does not resign or dissolve Parliament, said Charnvit Kasetsiri, a historian and former rector of Bangkok's Thammasat University. "If the government cannot control the situation, military intervention is not out of the question."