Thailand's constitutional court has ruled that a general election held in February was invalid, setting the stage for a new vote and further deepening the country's political crisis.

The judges voted by six to three to declare the 2 February election unconstitutional because voting was not held that day in 28 constituencies where anti-government protesters had prevented candidates from registering. The constitution says the election must be held on the same day nationwide.

"The process [now] is to have a new general election," Pimol Thampitakpong, the court's secretary-general, said at a news conference announcing the decision.

There was no immediate indication of when new polls may be held. The date is normally set by the government in consultation with the Election Commission.

The ruling would appear to have little practical effect in either alleviating or worsening Thailand's political crisis, which began late last year when protesters demanded that the administration of the prime minister, Yingluck Shinawatra, be replaced by an unelected "people's council" to implement reforms they say are needed to end corruption and money politics.

Yingluck refused to resign and called early elections in a bid to ensure a fresh mandate. But protesters tried to prevent the election from taking place, physically blocking and intimidating both potential candidates and voters. Their efforts prevented voting from being completed on the same day.

At the same time, the main opposition Democrat party – closely linked to the protest movement – boycotted the polls. Because voting was never completed, no results were announced, even for areas where there were no problems.

The Democrats indicated earlier this week that they would boycott fresh polls if held under Yingluck's caretaker government.

Even if new polls go smoothly, Yingluck faces several legal challenges that could force her from office, faced with a judiciary that has a record of hostility towards her and her political allies.

The protesters, whose main strength is in the Democrats' southern strongholds and Bangkok, have maintained constant, sometimes violent, street demonstrations in the capital. In turn, they have been the target of gun and grenade attacks by unknown parties. The attacks, along with street battles against the police and political rivals, have left at least 23 people dead and hundreds hurt.

Police Colonel Kamthorn Auicharoen said on Friday that two grenades fired overnight from an M79 launcher landed on houses near a constitutional court judge's residence in Bangkok, injuring one man. It was the latest in a series of such incidents, with most but not all targeting opponents of the government.

Thailand has seen political conflict since 2006, when then-prime minister, Thaksin Shinawatra, Yingluck's brother, was ousted by a military coup after being accused of corruption and abuse of power. Thaksin's supporters and opponents have since taken to the streets for extended periods in a power struggle.

The constitutional court issued its ruling after being petitioned by the state ombudsman, who accepted a complaint lodged by a university lecturer.