Police said a total of five people were injured, four of them needing hospital treatment in a series of incidents that began at Broomhouse Mosque in the west of the city.

The force said none of the injuries sustained were believed to be life-threatening. Two of the injured men were aged 22, and others were aged 24, 27 and 39.

The 22-year-olds were sitting in Sighthill Park, near the mosque after the Asr prayers at about 20:00, when they were approached by a man.

They were taken to hospital and discharged on Saturday, having been stabbed multiple times.

One man, who is well-connected to Muslim communities in the west of Edinburgh, told the BBC his “heart dropped” when he heard the men were members of a congregation.

“It doesn’t make sense that this is actually happening,” he said. “You know how Edinburgh is, a very good community. I never thought that’s a thing that would happen here.”

Aaquil Hussain, a liaison officer who manages parking and safety issues at Broomhouse Mosque, said the attacks were an “affront to British values”.