The Thai government declared a state of emergency banning gatherings of more than four people and outlawing online posts deemed a threat to national security on Thursday in a move to end simmering pro-democracy protests. The order was aimed at stamping out the “unconstitutional” protests and came after demonstrators demanding the prime minister’s resignation rallied outside his office in Bangkok overnight and scuffled with royalists opposed to the youth-led movement’s calls for reforms to the monarchy. Student activists have staged huge demonstrations since July calling for Premier Prayut Chan-o-cha, a former army chief who took power in a coup six years ago, to step down. The state of emergency allows for the seizure of “electronic communications equipment, data, and weapons suspected to cause the emergency situation”, a government spokesman said. It was unclear if a protest scheduled for later Thursday at a major Bangkok intersection would go ahead, with police warning that demonstrators “can no longer gather… as planned or they will face arrest”. Tensions flared on Wednesday as thousands of demonstrators rallied around Democracy Monument in Bangkok ahead of a scheduled afternoon drive-by of a royal motorcade carrying King Maha Vajiralongkorn and his family. While police had cordoned off most of the protesters away from the royal route, dozens were still present as the motorcade passed. Queen Suthida could be seen staring from a limousine window as protesters held up three-fingered salutes — a gesture of defiance the pro-democracy movement has borrowed from the popular “Hunger Games” books and films. Such overt challenges to the monarchy are unprecedented in Thailand, where the royal family’s influence permeates every aspect of society. Those calls have prompted a backlash from Thailand’s staunchly pro-royalist establishment. The King is the most powerful figure in Thailand and is supported by the kingdom’s powerful military and billionaire clans. He spends much of his time in Europe, but he and his family have been in Thailand in recent days for an annual Buddhist merit-making ceremony. Wednesday’s drive-by was the first encounter the royal family has had with the protesters. ‘Protesters ‘must face legal procedures’ Several popular anti-government movements have arisen in the turbulent modern history of Thailand, which has endured long bouts of political unrest and more than a dozen successful military coups since 1932. The army has long positioned itself as the sole defender of the ultra-wealthy king, whose power stretches across every facet of Thai society. Activists have repeatedly said they wish only for the monarchy to adapt to modern times. Their demands include the abolition of a strict royal defamation law — which shields the king from criticism — and for the monarch to stay out of politics. Since the protests started, dozens of activists have been arrested, charged with sedition and released on bail. Government spokesman Anucha Burapachaisri said the premier had ordered police to press charges against “the protesters who obstructed the royal motorcade” on Wednesday. Charges will also be pursued against “those who had acted in a way that defames the monarchy,” he said in a statement. “They must face legal procedures without exception.” After protesters marched to the Government House, they stayed through the night shouting for Prayut to “get out”, while some camped outside. Organiser Tattep Ruangprapaikitseree reiterated the need for a rewrite of a 2017 military-scripted constitution. “The new constitution must bring Thailand to a democratic system with the monarchy institution truly governed under it,” he said. “This could be the last fight for Thailand’s democracy,” said 18-year-old Attaporn, who travelled from the kingdom’s northern Pichit province to join the rally. “I have to do this if I want a better future.” Timeline Thailand ordered emergency measures on Thursday against protesters who have demanded the removal of Prime Minister Prayuth Chan-ocha, a former junta leader, and called for reforms of King Maha Vajiralongkorn’s monarchy. Below is a timeline of events since Prayuth was appointed prime minister after an election in March 2019. He rejects accusations the electoral laws were fixed in his favour. June 9, 2019 – The king endorses Prayuth as prime minister, keeping him in the post he first took in a 2014 coup. Nov. 20 – Constitutional court disqualifies vocal opposition figure Thanathorn Juangroongruangkit as a member of parliament, saying he violated electoral law. He disputes the ruling. Dec. 14 – Several thousand protesters demonstrate in Bangkok to protest against Thanathorn’s disqualification and the moves to ban his Future Forward party. Feb. 21, 2020 – Constitutional court bans Future Forward. The next day, hundreds of people join a protest against the decision. March 26 – Authorities impose a state of emergency to stop the spread of the coronavirus, limiting gatherings and travel. July 18 – The Free Youth group draws about 2,500 to a protest in Bangkok and makes three demands: dissolve parliament, amend the constitution and stop harassing critics. Aug. 3 – Human rights lawyer Arnon Nampa makes an unprecedented call for reform of the monarchy at a protest with a Harry Potter theme. Aug. 10 – Students at Thammasat University list 10 demands for reforming the monarchy, including abolition of lese majeste law against criticising the king. Aug. 16 – More than 10,000 people join a protest at Bangkok’s Democracy Monument. Sept. 19 – Tens of thousands protest in the biggest demonstration since the 2014 coup, cheering calls for reforms to the monarchy as well as for the removal of Prayuth. Sept. 20 – Protesters install a plaque near the Grand Palace in Bangkok with the message that Thailand belongs to the people and not to the monarch. It was removed the next day. Sept. 24 – Thai parliament votes to delay considering changes to constitution. Oct. 13 – Protesters scuffle with police and chant at the king’s passing motorcade to demand the release of 21 arrested protesters. Oct. 14 – Tens of thousands of protesters march to Prayuth’s offices, Government House, and set up camp to demand his removal. Police fend off jeering protesters as Queen Suthida’s convoy passes close to them. Oct. 15 – Government orders emergency measures that include bans on gatherings of five or more people and on news that could affect national security.