Protesters chanting “not my king” gathered in Edinburgh ahead of King Charles’ thanksgiving service.
Republican as well as royalist activists lined the Royal Mile where the King’s cavalcade passed on the way to St Giles’ Cathedral.
Another anti-monarchy group hosted a rally outside Holyrood, which was attended by Greens co-leaders Patrick Harvie and Lorna Slater.
Police Scotland later confirmed four people had been arrested.
They included two women, aged 20 and 21, who were arrested for breach of the peace after allegedly attempting to climb over a crowd safety barrier on the Royal Mile.
The force said one man was also arrested for theft, while another was arrested in connection with an outstanding warrant.
Three men and one woman were initially arrested for alleged threatening behaviour and failing to desist, but this was later changed to a recorded police warning.
Blacked-out barriers which are about 6ft (72in) in height were erected outside St Giles’ where the service took place.
During the thanksgiving ceremony the King was presented with the Scottish crown jewels to mark his Coronation.
Grant McKenzie, from the Republic anti-monarchy pressure group, told the BBC’s Good Morning Scotland programme his group would be vocal at the event, which he described as “undemocratic.”
He said: “It’s being forced upon us, we’ve got an unprecedented cost of living crisis.
“I don’t think the public in the UK are particularly interested in their tax payer money being put towards a parade up and down the Royal Mile in Edinburgh – it’s tone deaf.
“Of course people are going to be able to enjoy it if that’s what they want to do. Protests by their very nature are disruptive, we will be making ourselves visible and heard.”
Mr Harvie, who is the Scottish government’s minister for zero carbon buildings, active travel and tenants’ rights, addressed the Our Republic rally outside the Scottish Parliament.
He told the crowd: “It’s really important for those who want an elected head of state to be heard.”
The MSP said it was extraordinary to be “lavishing taxpayers money on some of the wealthiest people in the world so they can play some kind of Game of Thrones”.
He added: “Passing unearned wealth from generation to generation is fundamentally at odds with the democratic society we are trying to build.”
‘Safety was our priority’
Assistant Chief Constable Tim Mairs, police lead for the event, said: “This significant constitutional event took place safely without any disruption to the ceremony or people’s procession.
“Safety was our priority and a number of actions were taken to ensure this, which included an open approach to engaging with potential protest groups.”
In the build-up to the event the force said it sought to strike a balance between the right to protest and public safety.
Assistant Chief Constable Mairs added: “I would like to thank the overwhelming majority of protestors who engaged with us and also our officers whose professionalism helped ensure the safe delivery of this event for everyone who attended.”
As well as those protesting the ceremony, crowds hoping to catch a glimpse of the monarch and people’s procession also lined the streets.
One of those in attendance was royal fan Sheila Clark, from Newton Mearns.
Speaking on the BBC’s Good Morning Scotland, she said: “I’m as close to St Giles’ as I possibly could be.
“It’s a very special moment for me personally, I’ve followed the new King all my life really.
“I think it’s an important part of our heritage throughout Britain and particularly in Scotland, because the King’s roots are Scottish. His mother was Scottish, his grandmother was Scottish and I think Scotland is an important part of the United Kingdom.”