Thai police scuffled with paint-throwing protesters and arrested at least 21 of them before a royal motorcade passed by on Tuesday, drawing chants of "release our friends" as King Maha Vajiralongkorn's convoy swept past.
Such open dissent towards the monarchy has no recent precedent in Thailand and came on the eve of the latest planned anti-government demonstration.
The protests, which have swept the country for the last three months, present the biggest challenge in years to a political establishment that is dominated by Thailand's army and the palace.
Protesters are calling for a new constitution and the removal of Prime Minister Prayuth Chan-ocha, a former junta leader.
They have also called for curbs on the powers of the monarchy, breaking a longstanding taboo against criticizing the royal family which many Thais still revere. The Royal Palace has given no response to requests for comment on the protests or demands for royal reform.
Hours before the royal motorcade was due to pass Bangkok's Democracy Monument, protesters pushed up against a police line and some threw blue paint. Police demolished a tent set up for the protest and dragged some demonstrators into police vehicles.
Police said that 21 people had been detained, among them Jatupat Boonpattararaksa, a protest leader, and Chaiamorn Kaewwiboonpan, a singer. Those detained would be charged if appropriate, police added.
"The protesters may not have observed the law today so police had to act to bring order and didn't act disproportionately," government spokesperson Anucha Burapachai told Reuters.
After the trouble, the royal motorcade passed by on the other side of the street. Protesters raised their hands in the three-fingered salute of anti-government campaigners and demanded the release of those detained.
"This is the ugliness of feudalism, where one person can do anything and the majority of the people have to accept it unconditionally," Parit "Penguin" Chirawat, a student leader, said on Twitter.
Protesters have said they do not seek the abolition of the monarchy, but to reduce the king's powers under the constitution and to reverse an order to put the palace fortune and some army units under his control.
"The monarchy has to be under the constitution, that is how it supposed to be," said 21-year-old protester Waranya Siripanya.
Tuesday was a public holiday to mark four years since the death of the king's widely revered father, King Bhumibol Adulyadej, who reigned for seven decades.
Thousands of royalists gathered at the Grand Palace to pay their respects, bearing the late king's picture and flowers and wearing yellow shirts, the color associated with him.
In the evening, the king left the palace to greet supporters who had waited outside for hours.
Many royalists critical of the protesters.
"They may have been taught and told that the monarchy doesn't have any value to the nation," said Narongsak Poomsisa-ard, 67. "But I want to remind them that our nation exists until today, because we have the strong institution."
Thai Protesters Scuffle with Police as Royal Motorcade Passes
Activists protest against government and monarchy in Bangkok