Tens of thousands of pro-democracy protesters gathered again in the Thai capital Bangkok on Thursday in mass defiance of the government which had issued a decree banning demonstrations.
The protesters cheered and chanted peacefully, eventually dispersing several hours after a new 6pm curfew.
They called for the release of at least 20 activists arrested on Thursday in a sweeping crackdown by police.
Many made a three-finger salute - a symbol of the protest movement.
After peacefully leaving the site of the demonstration at Bangkok's Ratchaprasong Intersection, the protesters vowed to return on Friday at 17:00 local time (10:00 GMT).
This week saw the first protests of this movement take place while King Maha Vajiralongkorn was in the country - significantly raising the stakes. The king, who now spends most of his time abroad, has returned from Germany for several weeks.
In the early hours of Thursday morning, the government had attempted to curtail the student-led protest movement by issuing an emergency decree banning gatherings of more than four people and arresting about 20 activists - taking the total number of arrests this week to about 40.
Several key protest leaders were among those arrested, including human rights lawyer Anon Nampa, student activist Parit Chiwarak - widely known by his nickname "Penguin" - and Panusaya Sithijirawattanakul.
In a widely watched livestream video, officers were seen reading out charges to Ms Panusaya in a hotel room. Another video showed police putting her into a car as she and her supporters chanted slogans.
The protest movement they have helped lead began by calling for the resignation of Prime Minister Prayuth Chan-ocha - a former army chief who seized power in a 2014 coup and was appointed premier after controversial elections last year - and has expanded since to call for curbs on the powers of the king.
The calls for royal reforms are particularly sensitive in Thailand, where criticism of the monarchy is punishable by long prison sentences.
'We are fighting till our deaths'
The months of protests leading up to the emergency decree issued on Thursday represent the biggest challenge in years to Thailand's establishment, which is dominated by the military and royal palace. On Wednesday, protesters jeered and held up the three-finger salute as a motorcade passed carrying the queen through Bangkok.
The proximity of the demonstration to the royal convoy was cited by the government in a televised address as one of the reasons for the emergency decree. But the protesters ignored the new rules on Thursday afternoon to once again gather in their thousands.
"Like dogs cornered, we are fighting till our deaths," Panupong "Mike Rayong" Jadnok, one the high-profile protest leaders who remains free, told the crowd. "We won't fall back. We won't run away. We won't go anywhere."
Police appealed to the crowd to disperse, eventually setting a 18:00 curfew. "The people who came know that there is a ban against public gathering of five or more," said police spokesman Kissana Phathanacharoen. "We will take things step by step."
Few in Thailand will have been surprised to hear of the arrest of the main protest leaders and tougher restrictions on freedom of assembly and expression. Some may even have been relieved that it did not end in bloodshed, as so often before in political crises here.
When Anon Nampa, a deceptively mild-looking lawyer, first called for an honest discussion about the monarchy, on 3 August, you could almost hear the collective intake of breath across the country at his boldness. When Panusaya Sithijirawattanakul read out 10 demands for royal reform and accountability from a university stage a week later, Thailand braced itself for a backlash. In a country where every constitution requires the king to "be held in a position of revered worship", this was akin to blasphemy.
The backlash did not come. A government struggling under the weight of multiple challenges, from the dire economic outlook to a series of scandals, seemed reluctant to risk provoking further public anger.
But the persistence of large-scale rallies, where protesters ridiculed the royal institution, could not be tolerated for long, especially now that the king had returned to Thailand for an extended stay.
With their leaders locked up outside Bangkok and any public gatherings banned, the movement will find it hard to keep going. The authorities may also go after those they believe have been funding the protests.
But what has been said about the monarchy cannot be unsaid. A taboo has been broken. People of all ages, from all parts of the country, aside from die-hard royalists, now agree with the student leaders, that the monarchy is fair game in any overhaul of Thailand's institutions. It is only a matter of time before we see similar protests again.
How did the protest movement begin?
Thailand has a long history of political unrest and protest but a new wave began in February after a popular opposition political party was ordered to dissolve.
The order followed elections in March last year - the first since the military seized power in 2014 and the first chance to vote for many young people and first-time voters. The elections were seen as an opportunity for change after years of military rule.
With the all-important support of the military, Prayuth Chan-ocha was re-installed as prime minister. The pro-democracy Future Forward Party (FFP), with its charismatic leader Thanathorn Juangroongruangkit, garnered the third-largest share of seats and was particularly popular with young, first-time voters.
But in February a court ruled the FFP had received a loan from Thanathorn which was deemed a donation - making it illegal - and the party was forced to disband, prompting thousands of young Thais to join street protests.
The protests were halted by Covid-19 restrictions, which banned gatherings, but they began again in June when a prominent pro-democracy activist went missing.
Wanchalearm Satsaksit, who had been living in Cambodia in exile since 2014, was reportedly grabbed off the street and bundled off into a vehicle. Protesters accused the Thai state of orchestrating his kidnapping - a charge police and government officials have denied.
In recent months, the protesters have challenged the king's decision to declare Crown wealth as his personal property, which made him by far the wealthiest person in Thailand. It had until now been notionally held in trust for the benefit of the people.
There have also been questions over the king's decision to take personal command of all military units based in Bangkok - a concentration of military power in royal hands unprecedented in modern Thailand.