The protesters – who style themselves as the Scottish Defence League or SDL – were effectively squeezed into a single street.
The band of about 80 people briefly unfurled banners calling for the banning of the burqa, the cover-all dress worn by some Muslim women, sang Rule Britannia and shouted "SDL" to shouts of "scum" and boos from shoppers.
Police said they had made five arrests for minor offences, one of which was allegedly racially aggravated.
The force had been eager to keep the SDL – widely seen as a front for the English Defence League or EDL, whose aim is to campaign against Islamism – away from a much bigger counter-demonstration.
Meanwhile, up to 1,000 demonstrators against the Afghanistan conflict yesterday marched through Edinburgh city centre, where the annual Nato Parliamentary assembly is taking place. Joan Humphreys, whose Black Watch private grandson Kevin Elliott, 24, was killed in Afghanistan in August, addressed the crowd, calling for British troops to pull out. She said: "I would like the troops to come home walking – not on stretchers or in body bags."