A Thai court has endorsed Prime Minister Yingluck Shinawatra's declaration of a state of emergency.
The move comes a day after five people were killed in gun battles in Bangkok, but the government was warned not to use it to disperse peaceful protesters.
The country's police chief said the court ruling would not affect the security operation.
But he added that there were no plans to retake more protest sites after the "Peace for Bangkok Mission" saw the deadliest clashes since anti-government demonstrations began in November.
Ms Yingluck, seen by opponents as a proxy for her brother, ousted former premier Thaksin Shinawatra, has been working from a Defence Ministry compound in north Bangkok since the protests forced her to vacate her Government House offices.
Protesters who want to drive her from office and eradicate Ms Thaksin's influence surrounded the building, but there were no clashes with troops standing guard and Ms Yingluck and other ministers stayed away.
The Civil Court in Bangkok dismissed a case brought by protest leaders who wanted a 60-day state of emergency announced last month declared illegal, but added that the government was "not allowed to use clauses in the state of emergency to disperse the protests".
The protests are the latest instalment of an eight-year political battle broadly pitting the Bangkok middle class and royalist establishment against the mostly rural supporters of Ms Yingluck and Mr Thaksin.
Problems continue to mount for Ms Yingluck, after an anti-corruption agency filed charges against her over a rice subsidy scheme.
It has provoked middle class anger and left hundreds of thousands of farmers, her natural backers, unpaid.
The protests are the latest round of an eight-year political battle broadly pitting the Bangkok middle class and royalist establishment against the mostly rural supporters of Ms Yingluck and Mr Thaksin.
Bluesky TV, the protest movement's own channel, showed footage of troops guarding the building behind barbed wire.
In contrast to yesterday's face-off with police, the atmosphere was not confrontational and protest leader Suthep Thaugsuban was allowed inside to speak to senior soldiers.