A Thai court has ordered the government not to use force against anti-government protesters after clashes between riot police and demonstrators left five dead and nearly 70 wounded.

The civil court of Thailand ruled that some orders issued by the prime minister and a special security command centre under an emergency decree were illegal because they would violate the protesters' constitutional rights.

The prohibited orders included bans on gatherings of five or more people and the use of certain roads by the demonstrators. The court also prohibited the government from using force to crack down on the protesters.

But the court also rejected a demand by the opposition that it revoke the state of emergency, saying it was within the executive branch's power to enforce such a law.

The ruling by the civil court could complicate handling by the prime minister, Yingluck Shinawatra, of more than three months of mass opposition protests, although her government had already pledged to avoid using violence against the demonstrators.

On Wednesday, protesters besieged the Thai prime minister's temporary offices in Bangkok's northern suburbs and vowed to hunt her down until she resigns.

"Wherever she is, wherever she sleeps, we will go after her," protest leader Suthep Thaugsuban said of the embattled Yingluck. "[We] must intensify our fight and we will attack Shinawatra businesses and their funding sources."

Protesters have been calling for Yingluck's resignation since November under the banner of the People's Democratic Reform Committee (PDRC), which aims to install an unelected "people's council" to institute political reform, citing government corruption.

The PDRC has been leading a Bangkok "shutdown" for the past month during which demonstrators have occupied government ministries, public parks and major intersections, cut off power to ruling MPs' homes and and cemented shut the gates to Yingluck's Government House.

Yingluck – whose Puea Thai party won a landslide election in 2011 – has consequently been ruling Thailand from temporary offices and had hoped this week to be able to return to her normal office in Dusit. But after Tuesday's violence, in which four protesters and one police officer were killed in a gun and grenade attack after police attempted to remove demonstrators from protest sites, both she and her cabinet ministers stayed away from all offices.

Pro-government "redshirts" offered on Wednesday to provide offices and security personnel to the embattled government should it wish to move up to Chiang Mai, Yingluck's hometown and a major base of voter support.

"If the government is unable to work in Bangkok, Chiang Mai is ready to serve as the new headquarters," redshirt leader Petchawat Wattanapongsirikul told English-language daily paper The Nation.

Until Tuesday, the Thai government had exercised considerable restraint against the protesters in an attempt to diminish the possibility of a military coup.

But the army, which supports the monarchy and the old-school Bangkok establishment, has said it will intervene only if the police are unable to maintain order and told Reuters that it would act only upon government request.

"Our strategy has not changed and is still to provide support to police," said Colonel Werachon Sukonhapatipak. "We have no intention of deploying extra troops. If the government needs extra help with security, it has to ask us and so far it has not asked for reinforcements."

More than 180 demonstrators have been arrested, 15 people killed and several hundred injured, since protests began in November. Police said on Wednesday they did not plan to retake any protest sites in the near future.