Thailand's Constitutional Court has ruled that a general election held last month was invalid.
The 2 February polls, called by Prime Minister Yingluck Shinawatra in an unsuccessful attempt to ease a long-running political crisis, have not yet been completed because of disruption by demonstrators.
A court spokesman told reporters that the six-three ruling was reached on the grounds that voting was not held for the entire country on the same day.
Opposition protesters blocked candidate registrations in 28 constituencies, and also caused the closure of about 10% of polling stations.
The main opposition Democrat Party boycotted the vote, saying it would not end years of political turmoil.
The case was one of a number of legal hurdles facing Ms Yingluck, who has withstood calls to resign despite months of political street protests.
A spokesman for her Puea Thai Party described the outcome as "regrettable", and said the annulment of the vote would "set a bad precedent".
The petition was filed by a Bangkok law lecturer.
A similar bid, submitted by the opposition on the grounds that the failure to hold the entire election on the same day was an attempt to grab power unconstitutionally, was rejected by the Constitutional Court last month.
Ms Yingluck's government, in a caretaker role following the incomplete election, faces a series of legal challenges that could lead to her removal from office, including negligence charges linked to a rice subsidy scheme.
She has faced more than four months of street demonstrations seeking to force her from office and install an unelected government to oversee reforms and curb the dominance of her billionaire family.
Twenty-three people have been killed in recent weeks in gun and grenade attacks, mostly targeting protesters.
It is the latest chapter in a political crisis stretching back to a military coup in 2006 that ousted Ms Yingluck's brother Thaksin Shinawatra, who lives in Dubai to avoid prison for a corruption conviction.
On Tuesday, Thailand ended a state of emergency in force for almost two months in Bangkok and surrounding areas, reflecting an improvement in security since protesters scaled down their rallies at the start of this month.