Thailand's parliament has elected a new prime minister, Abhisit Vejjajiva, ending a coalition government closely associated with a controversial former prime minister. Protesters battled outside the parliament building after the vote, a sign that the country's deep political divisions remain.

As head of a coalition government, the 44-year-old Mr. Abhisit will be Thailand's 27th prime minister. His election ends a year of government by parties aligned with former Prime Minister Thaksin Shinawatra.

Many Thais hope Monday's vote will end months of political tensions. Those tensions were worsened when thousands of anti-government demonstrators laid siege to the prime minister's office building and then blockaded Bangkok's airports earlier this month.

Sompob Manarangsan, an economics professor at Chulalongkorn University, says the vote will help restore confidence in Thailand's democracy.

"At least we have gone through some of the political deadlock compared with a couple of weeks ago. But now at least we have passed through the very critical period of time," said Sompob.  "At least we can restore or maintain our democracy. That is very important."

The anti-government accused the former cabinet of acting as a proxy for Mr. Thaksin, who was ousted in a coup two years ago. He lives in exile, having fled corruption charges.

Mr. Thaksin's brother-in-law, Somchai Wongsawat, resigned as prime minister earlier this month and his People Power Party was abolished after a court found it guilty of electoral fraud.

His critics accuse Mr. Thaskin of being authoritarian and corrupt. But he enjoys widespread support among the rural poor and urban working-class.

Right after Monday's vote, hundreds of his supporters unsuccessfully tried to block the exits of the parliament. Many of them call Mr. Abhisit's election a "silent coup", engineered by the military.

Kudeb Saikrajang is a spokesman for the Phuea Thai Party, formed by members of the abolished People Power Party. He says the new government could face hostility.

"I believe the people in the villages who support the Puea Thai or the former PPP would be very unhappy about the situation today and I don't think the performance of the Democrat-led government can satisfy all the grass roots people because they understand that they have been robbed of power," he said.

Democrat Party spokesman Buranaj Samutharark says the government's priority will be bridging social divisions.

"Clearly it is to reach out to the people from all parts of the country which have been stricken with divisiveness as a result of the political crisis over the past few years and do everything to reunite the country," he said.  "This is a first step towards regaining confidence in the economy and trying to move the country forward again."

Mr. Abhisit also has said his government will focus on the economy, which has been weakened by the political infighting at home and the financial crisis overseas.

The new prime minister will announce his cabinet in a few days, after Thailand's king approves his election.