Thailand issued an emergency decree banning protests as it clamps down on largely peaceful pro-democracy rallies that have also targeted the monarchy.
In a televised announcement the government said urgent measures were needed to “maintain peace and order”.
It said protesters had intended to instigate an incident leading to “chaos and incitement of conflict and public disorder”.
It cited the “obstruction to the royal motorcade” as one of the reasons for its imposition. Some protesters on Wednesday had raised the three-finger salute, a symbol of the movement, at a convoy carrying the queen as they were pushed back by ranks of police.
Shortly after the decree took effect, Thai riot police cleared protesters from outside the prime minister’s office.
Thailand’s student-led democracy movement has been calling for the resignation of Prime Minister Prayuth Chan-ocha. The former army chief had seized power in a 2014 coup before he was appointed as premier after controversial elections last year.
The protests have widened in recent months to also call for curbs on the king’s powers.
Demonstrators also demand the constitution be rewritten; that the authorities stop harassing critics and royal reform are particularly sensitive in where criticism of the monarchy is punishable by long prison sentences.