Bangkok, Thailand – Embattled Prime Minister Thaksin Shinawatra announced Tuesday that he would resign in an effort to end months of demonstrations that have shaken Thailand, pledging to leave office as soon as a new parliament convenes.

In a brief evening address to the nation, a subdued Thaksin offered his apologies to the 16 million Thais who voted for him two days earlier in snap elections boycotted by the main opposition parties, handing him what first appeared to be a third term.

But that victory was marred by a massive protest vote and failed to defuse an opposition movement that has repeatedly drawn tens of thousands of demonstrators into the streets of the capital.

“I want all Thais to reunite,” he said. “We have no time to quarrel. I want to see Thai people unite and forget what has happened.” He said he was anxious to relinquish his office but would remain until a new prime minister was selected.

Under Thai law, the new parliament should convene and begin that process by the beginning of next month. But the session cannot open until all 500 seats are filled; 38 still remain vacant after the weekend polls.

The national election commission announced Tuesday it would hold new elections in those districts in two weeks.

Thaksin’s pledge to resign marked a stunning reversal of fortune for a man who had aspired to be Southeast Asia’s premier statesman and only last year became the first elected prime minister in his country’s history to complete a term and then be elected to a second one.

His triumph last year on a wave of rural support was so overwhelming that, for the first time, a Thai leader could govern without forming a coalition. But this former policeman turned mobile telephone tycoon alienated many in the capital with his autocratic approach.

As thousands gathered in Denver’s City Park on Monday to celebrate the life and legacy of Martin Luther King Jr., speakers didn’t mince words: King’s message was not only about love and unity, they said, but it was about fighting for freedom and equality for everyone.