BANGKOK — Buildings blazed across central Bangkok early Thursday, torched by rioters after army troops routed anti-government protesters to end a two-month siege – Thailand’s deadliest political violence in nearly 20 years.

The government quelled most of the violence in Bangkok but not the underlying political divisions that caused it, and unrest spread to northern parts of Thailand.

Prime Minister Abhisit Vejjajiva imposed a nighttime curfew in the capital and 23 other provinces and said his government would restore calm. Although leaders of the Red Shirts surrendered, sporadic clashes between troops and protesters continued well after dark.

Bangkok’s skyline was blotted by black smoke from more than two dozen buildings set ablaze — including Thailand’s stock exchange, main power company, banks, a movie theater and one of Asia’s largest shopping malls.

At least six people were killed in clashes that followed the army’s storming of the protest camp Wednesday. Witnesses said another six to eight bodies were in a temple where hundreds of demonstrators, including women and children, had sought sanctuary.

Since the Red Shirts began their protest in mid-March, at least 74 people — mostly civilians — have been killed and nearly 1,800 wounded. Of those, 45 people have died in clashes that started May 13 after the army tried to blockade their 1-square-mile camp.

While many of the rioters were believed to be members of the Red Shirts and their sympathizers, there was also an element of criminals and young hoodlums involved in the mayhem in the city of 10 million people.