Thailand's Constitutional Court invalidated last month's parliamentary elections on Monday and ordered fresh polls in a bid to end a political impasse that has left the country unable to form a new government.

The opposition Democrat Party, which had boycotted the controversial April 2 elections, praised the court's ruling and pledged to take part in the upcoming polls "so the country can move forward," said party leader Abhisit Vejjajiva.

When the new elections will be held has yet to be determined.

The widely expected ruling came after the nation's revered monarch, King Bhumibol Adulyadej, last month urged Thai courts to find a way out of what he called the country's political "mess."

CountryWatch: Thailand

Prime Minister Thaksin Shinawatra called last month's elections three years ahead of schedule to defuse anti-government street protests and growing calls for his resignation.

But public anger continued, with an opposition boycott of the elections and hundreds of legal complaints alleging that the vote was undemocratic and unconstitutional.

The court's 14 judges voted 8-6 to invalidate the parliamentary elections based on a lawsuit filed by academics who accused the Election Commission of several violations, including that it acted too hastily in organizing polls, making it unfair for small parties.

"The organization of the election by the Election Commission was unconstitutional," court spokesman Paiboon Warahapaithoon said in a nationally televised news conference to announce the judges' ruling.

Though the constitution states that elections must be called within 60 days of the dissolution of Parliament, the court ruled the commission's decision to call polls within 37 days "went against the intention of the constitution," Paiboon said.

Another point of contention was the positioning of polling booths, which the court agreed "violated the principle of confidential voting," Paiboon said.

In a separate vote, the court ruled 9-5 in favor of holding new elections, Paiboon said.

The Constitutional Court's ruling was expected to end a flurry of legal activity that had saddled two of the country's high courts with hundreds of lawsuits filed against the elections.

The Administrative Court — which handles disputes involving state agencies — was examining a complaint lodged by another group of academics against the Election Commission and had said it would rule May 16. A ruling was still expected as a formality.

Street protests started earlier this year, with critics accusing Thaksin of widespread corruption and abuse of power. He was also blamed for mishandling a Muslim insurgency in southern Thailand and stifling the country's once vibrant media.

To calm dissent and win a fresh mandate, Thaksin dissolved Parliament in February and called snap polls. His Thai Rak Thai party won 57 percent of the vote, but millions of Thais cast protest votes and the opposition boycott left the lower house without the full 500 lawmakers required for Parliament to convene.

Days after the election, Thaksin announced he was taking "a break" from politics to restore national unity and passed his duties to his deputy, Chitchai Wannasathit.