First Minister John Swinney has condemned what he called a “heinous” suspected anti-Muslim attack in Edinburgh on Friday.

Along with government ministers he received an update on the attacks, in which five people were injured across the city, from Assistant Chief Constable Catriona Paton, and said he will look for ways to support the Muslim community.

The government and Police Scotland say they are actively engaged with Muslim community leaders and wider faith groups to “ensure appropriate safety measures are in place”.

Mr Swinney met with Muslim leaders on Monday to “stress his solidarity” and provide assurance that The Scottish Government will “continue to stand united against all forms of violence, division and prejudice”.

CCTV footage obtained by the BBC showed a man driving erratically before exiting his vehicle and attacking one man and a delivery driver while wielding two large knives on Leith Walk.

After attacking another man who had just got off the tram, the bare-chested alleged attacker, cigarette in mouth, begins repeatedly striking the door of a pizzeria. He is then apprehended by police armed with tasers, who arrived on the scene shortly after. Police Scotland confirmed that tasers were carried, but not deployed.

A series of other incidents at a Broomhouse Mosque, a Shell garage at Telford Road, and a BP garage at Ferry Road preceded the Leith Walk incident.

Police say that five people were injured across the city and counter terrorism police were assisting in the investigation.

In a statement, Mr Swinney said: “There is no place for race-based or faith-based violence in Scotland.

“My thoughts are with all who have been impacted – the victims but also the communities who are understandably anxious by what happened.

“We must all stand united in utter condemnation of the heinous attack that took place in Edinburgh.

“Anti-Muslim hatred is abhorrent, and we must not allow recent attempts to stoke fear to divide us.”

He added: “Everyone who lives in Scotland – those that were born here and those that have decided to make Scotland their home – epitomise Scotland’s values of hope, tolerance and solidarity.

“These are values that must be cherished, nurtured and protected. We must all come together to ensure that.

“I am grateful to Police Scotland for the continued work they are undertaking to ensure communities feel safe and supported.

“I want to reassure communities that my government will lead from the front in tackling all forms of violence, division and prejudice.”

Prime Minister Keir Starmer described the attacks as “absolutely appalling”, adding that “no one should face violence on our streets”.

He also promised that the attacker would face “the full force of the law”.

Speaking at a community event, the MSP for Edinburgh Northern and Leith, Ben Macpherson, said:

“The horrific attacks that took place on Friday were utterly appalling.

“My thoughts are with the people who’ve been hurt and everyone affected. I’m also grateful to the police for their response to the situation, and their ongoing engagement locally.

“Leith is one of the most diverse, vibrant places in our country. For decades it has been a place where people from different backgrounds, faiths and cultures live side by side, positively and peacefully, with respect, care, and kindness.

“We will not allow violence or extremism to divide us or stoke fear – we’re too strong in our diversity for that.

“The people of Leith are responding by showing solidarity with all of our diverse communities – and I have been in touch with our local Muslim leaders and am actively working to support them.

“We can all help to stand up for our diverse society by calling out any far right rhetoric and being pro-actively anti-racist. Hatred has no place in Leith, Edinburgh or anywhere else in Scotland.”

The leader of the City of Edinburgh Council, Cllr Jane Meagher, similarly condemned the attacks.

In a statement, she said: “I was shocked and outraged to hear about the appalling incidents that took place across the city on Friday.

“I, and fellow Councillors, stand in solidarity with those affected by what must have been a deeply traumatic experience. My thoughts are with those injured in the attacks and I wish them a quick recovery.”

She also took time to pay tribute to the response of emergency services and police: “I want to pay tribute to Police Scotland, including counter terrorism officers, and other emergency services for their quick action.

“I absolutely echo the words of Police Scotland that there is no place for racism or faith-based hate. I condemn all acts of racist violence and disorder – there is simply no place for it in our city.

“Those in our Muslim communities may understandably be feeling worried and concerned. I want to reassure that we will be working closely with Police colleagues and other partners to do all we can to make sure that communities across the city are safe and supported.

“Edinburgh is a proud diverse and welcoming city – strengthened by those from all backgrounds, cultures, faiths and walks of life that live here. Incidents like this remind us of the need to stand together against racism and prejudice.”

In a statement following the incident, Police Scotland confirmed that five men, two aged 22, and others aged 24, 27, and 39, sustained a range of injuries and three required hospital treatment, however none of the injuries are life threatening.

A 36-year-old white Scottish man was arrested and charged.

Assistant Chief Constable Catriona Paton said: “This was a shocking attack and my first thoughts are with those who were injured and most directly affected.

“I want to send a clear message of support to all our communities that there is no place for racism or faith-based hate in a Scotland which is at its best when we stand together.

“Officers responded to multiple reports of a fast-moving sequence of events across Edinburgh before arresting a man and public safety was our priority.

“Extensive work is ongoing to establish all the circumstances. We are being supported by Counter Terrorism Policing and working under the direction of the Crown Office and Procurator Fiscal Service.

“I want to thank our officers who responded with bravery and professionalism, and with a focus on protecting the public.

“I’m hugely grateful for the support and assistance of our communities and would appeal for anyone with any information to share it with police. We have established a major incident police portal.”