Thousands of anti-fascist protesters staged demonstrations across Edinburgh on Saturday as members of the far-right Scottish Defence League (SDL) gathered in the city.
Lothian and Borders Police drafted in officers from the Strathclyde, Fife and Northumbria forces to bolster their numbers in the capital - in all, it is understood that 900 police were on duty.
In one incident, scores of banner-waving activists attempted to enter a bar opposite the Scottish Parliament. Protesters said members of the SDL were inside Jenny Ha's bar and vowed to stay in the area until the SDL members left the city.
Police later loaded members of the league on to a bus to leave. Officers had closed the Royal Mile, with the road sealed off and hundreds of police on the street keeping opposing groups apart.
It is believed that around 90 people were kept inside the bar by police, who blocked the doors to stop trouble on the street. Minor scuffles broke out when some SDL supporters passed by anti-fascist activists behind police cordons close to the building.
Meanwhile, inside, SDL supporters held up flags and banners protesting against Islamic Sharia law.
Riot vans with officers wearing helmets eventually surrounded the pub entrance while two double-decker buses were driven towards the door.
Despite chants from SDL supporters that they would not be moved, the SDL members made their way on to the buses before being driven past two small counter-demonstrations assembled along the Royal Mile and outside Holyrood.
Officers said no arrests were made and the street was cleared by 4pm. A small number of SDL members were also held in Edinburgh's Waverley station.
Student protester James Nesbitt, 23, from Glasgow, said: "We had spotters out across the city looking for fascists in pubs. We got here quickly but the police are doing everything they can to keep us away from them. We're here because people are frightened with the developments in the far-right."
The incident happened as a formal anti-racism rally began in Edinburgh city centre. At least 2,000 people are believed to have taken part in the Scotland United rally, which was prompted by SDL plans to gather in the capital and protest against "militant Islam".
MSPs, charities, trade unions and faith groups were among those taking part in the rally, and speaker Aamer Anwar told STV News they planned to show there is no place for racist and fascist organisations in Scotland.
Mr Anwar, one of the rally organisers, said the march would serve as a warning to the SDL to "stay away". He had previously said: "We are uniting, right across the political spectrum, against their message of hatred. And we are sending a out a positive message, one of unity and one of celebration of our diversity.
"Let me be quite clear. They are testing the water and complacency is not an option. Silence is not an option. In the 1930s, the fascists scapegoated one section of the community, the Jewish community. And now today, what we have is a far right Nazi organisation that is scapegoating the Muslim community and that's why we're uniting. And every time they raise their heads they have be exposed for what they are, which is fascists."
Osama Saeed of the Scottish-Islamic Foundation, one of the protest's organisers, said: "Today is a further humiliation for the SDL. They only got ten minutes in the rain last November in Glasgow. They didn't even get that today. This is only due to good people coming out in numbers to take over Edinburgh's streets. The threat from the far-right cannot be ignored and simply wished away."
Scottish Justice Secretary Kenny MacAskill, one of the rally's guest speakers, said: "Today is about making a stand against those who would seek to divide and saying to them that their views are not welcome, as well as showing to the world that Scotland will not tolerate such views."
Scottish Labour leader Iain Gray added: "The message from today's rally was upbeat and clear - Scotland will never stand by and allow hatred and bigotry to have its day. There is no place for - and Scotland will give no platform to - those who would divide our communities and attack our citizens."
The SDL describes itself as non-violent and pro-British. A video posted under the group's name on You Tube urges members to head to the capital to demonstrate against "Islamification" in the UK.
Police had earlier said that the SDL had not sought permission for a demonstration and it was unclear how many people might come to take part. Scotland United's organisers insisted any right-wing activist who tried to march in the city should be removed immediately.
Lothian and Borders Police assistant chief constable Iain Livingstone said: "We are pleased that today's activity in the city centre passed off without major incident, and with only five arrests being made for public order offences.
"At this time I'd like to thank those who participated in the Scotland United rally and march, the majority of whom were well behaved and willing to engage constructively with police. I would also like to thank those members of the public who may have experienced some disruption to their day as a result of the activity in the city centre, for their patience and co-operation."
A demonstration held in Glasgow in November by the SDL saw around 100 protesters contained by police and then herded onto buses out of the city, while thousands passed peacefully through the city in an anti-fascism protest at the same time.
In their online video urging members to attend the event in Edinburgh, the SDL said it would "unite with their fellow countrymen to defend this great nation. We will never surrender".
It continued: "To carry on the fight against Muslim extremists and Islamification in Great Britain, we will never surrender. If you love this country and love Great Britain then please join us in Edinburgh on February 20. We all join as one."
The Scotland United rally, organised by Unite Against Racism and Fascism, begun in Princes Street Gardens before heading through the city centre.
The SDL is an offshoot of the English Defence league, which has staged protests in Manchester and Birmingham which resulted in violence.