Thailand's Constitutional Court has ruled that the recent general election was invalid, and another must be held.
The opposition boycotted the 2 April election
Judge Ura Wangomklang said the court had decided by nine votes to five that the 2 April poll was unconstitutional.
Thailand has been in political limbo since the election, which was called by Prime Minister Thaksin Shinawatra in the face of mounting protests.
The opposition boycotted the poll so not all the seats were filled, which meant parliament could not sit.
The country's opposition parties had backed the nullification of the 2 April poll, and have said they will contest the new one.
THAILAND'S POLITICAL CRISIS
23 January: Thaksin sells 49.6% family stake in telecoms company Shin Corp
4 February: 50,000 attend rally in Bangkok demanding Thaksin's resignation; similar rallies then continue
24 February: Thaksin dissolves parliament and calls snap election
27 February: Three main opposition parties say they will boycott the polls
2 April: Thais vote for new government amid opposition boycott
4 April: Thaksin says he will step down, depite winning 57% of the vote, because of large protest 'no vote'
23 April: By-elections held, but fail to resolve crisis
25 April: Thai king calls on court to solve "mess"
8 May: Constitutional Court rules 2 April election invalid
Thailand's three courts agreed to rule on the election's validity after a rare intervention by King Bhumibol Adulyadej, who described the situation as a "mess" and said any parliament with no opposition presence would be undemocratic.
Many analysts said that invalidating the election was the only way to move the country forward.
The crisis began when Mr Thaksin dissolved parliament in February, calling polls in an effort to prove he still had widespread public support despite the regular massive street protests held in Bangkok.
His Thai Rak Thai party won 57% of the vote, but millions of Thais cast protest votes and Mr Thaksin announced his decision to step aside a few days later.
But his departure still left many questions - including how to fill the seats left vacant because of the opposition boycott and the deep anti-Thaksin sentiments in many parts of the capital and the south of the country.
Two rounds of by-elections failed to resolve the issue, and when the king stepped in, calling on the judiciary to end the problem, it seemed that the only solution would be to hold fresh elections.
Soon afterwards, the top judges from Thailand's three main judicial institutions - the Supreme, Administrative and Constitutional courts - met to discuss the situation.
It is unclear what their discussions entailed, but analysts predicted that the result would be an annulment.
The king's comments seem to have been a catalyst for action
Now, after considering complaints about a number of minor irregularities, the Constitutional Court has delivered that verdict.
The path ahead, though, is still not clear, according to the BBC South East Asia correspondent Jonathan Head.
The opposition does not want Mr Thaksin to run again for prime minister, but he is considered a key vote winner for Thai Rak Thai, which retains the support of most rural voters.
The main opposition parities, which boycotted the last poll, are also demanding constitutional reforms to strengthen the checks on the prime minister's power.
But they have not specified what changes they expect, and neither is it known how quickly or easily these changes could be agreed.