(CNN) -- Thailand's constitutional court has declared the country's February 2 general election invalid as it breached a law requiring that the polling process be completed on the same day nationwide.
The opposition's boycott of the vote and widespread anti-government protests meant that candidates were not fielded in 28 constituencies. It had been expected that voting would take place in those areas at a later date.
However, the court's six to three majority verdict cannot be appealed, meaning a new general election must be held across the South East Asian country.
Thai Prime Minister Yingluck Shinawatra called elections in December, in an attempt to end political unrest.
Yingluck is the sister of former Prime Minister Thaksin Shinawatra, who was ousted in a military coup in 2006 and now lives in exile. Yingluck's critics accuse her of being a proxy for her brother, who was convicted of corruption charges in 2008 and sentenced to prison in absentia.
Yingluck's government was largely stable until her party attempted to pass a controversial amnesty bill in November, sparking a wave of protests. The bill would have nullified Thaksin's corruption conviction and allowed him to return to the country.
Anti-government protesters have been demanding that an unelected "people's council" be given the power to carry out political and electoral changes in a country where parties affiliated with Thaksin have dominated elections since 2001.
The main opposition Democrat Party boycotted the February 2 polls and protesters blocked officials from gathering ballots and obstructed voter registration in many constituencies.
That left the outcome of the election inconclusive, without enough results to reopen parliament, and with Yingluck in charge of a caretaker government.
Red shirt protest
More than 20 people have been killed and hundreds wounded since the protests erupted, with Yingluck's supporters -- the "red shirts" clashing with anti-government protesters.
The red shirts have announced they will hold a rally this weekend in Pattaya city, about 90 minutes from Bangkok. CNN's Kocha Olarn says the constitutional court's ruling will likely result in a huge turnout.
The conflict has deepened the country's political divide. The anti-government movement draws its support from southern Thailand, Bangkok's middle class and the established elites. Yingluck's base is in the less affluent but more populous regions north and east of the capital.
The Bangkok Post reported that the court hearing was held at the request of Thailand's Office of the Ombudsman. It followed the lodging of a complaint by a law lecturer who argued the February vote was unlawful, the paper said.
State of emergency
Earlier this week, the Thai government ended a 60-day state of emergency imposed on Bangkok and several surrounding areas in the run-up to the election.
The state of emergency had given authorities the power to impose curfews, detain suspects without court permission, censor media and declare parts of the capital off limits.
It has been replaced with the Internal Security Act (ISA), which will be in effect until April 30.