Protesters have gathered in Bangkok in the latest in months of anti-government demonstrations that have also called for reforms to Thailand's powerful monarchy.
A few kilometres away, thousands of royalists gathered in yellow shirts and waved Thai flags as they waited to greet King Maha Vajiralongkorn, who was expected to attend a local event.
The initial focus of protests that began in July was to seek the removal of Prime Minister Prayuth Chan-ocha, a former junta leader.
About 2500 protesters gathered at Democracy Monument in Bangkok, according to police, putting on songs and dances mocking the government.
Prayuth's government holds the majority in parliament because his junta picked the entire upper house before an election last year that opponents say was designed to keep him in power. He says the vote was fair.
Police said they would not use violence to crack down on demonstrators and deployed 5100 troops to maintain order.
But last week thousands were met with water cannon when they marched to the Grand Palace to demand curbs to the monarchy's power.
Two kilometres away, thousands of royalists waited for the king's arrival where he was due to attend the opening ceremony of a subway station.
Protesters said they would turn their back when the Royal Motorcade passed.
Demonstrators have increasingly called for reforms to the powerful monarchy, breaking a long-standing taboo against criticising the institution.
The Royal Palace was not available for comment. It has not commented since the start of the protests, but the king said two weeks ago that the protesters were still loved and that Thailand was a land of compromise.
Criticism of the monarchy can be punished with 15 years in jail under Thailand's lese majeste laws, but it has become widespread in recent weeks.