Nicola Sturgeon has condemned “vile racists” who posted offensive comments about pupils online after she visited a school.

Scotland’s First Minister retweeted a picture of herself with pupils at St Albert’s Primary in the Pollokshields area of Glasgow on Friday during a visit to mark the end of Climate Week.

A number of people responded with racist remarks about the photo, which she had retweeted saying: “Thank you @StAlbertsG41 – you were wonderful as always.”

Ms Sturgeon tweeted her support for the primary school after it later said it had been subjected to “the most horrific racist abuse”.

In a statement posted on social media, St Albert’s Primary said: “After an exciting day celebrating our success with our First Minister we have been subject to the most horrific racist abuse.

“We are proud to serve our community, proud of our children who demonstrate the best of Scotland.”

Ms Sturgeon retweeted the statement, saying: “Every brilliant young person and every member of staff @StAlbertsG41 is worth a million and more of the vile racists who hurl abuse at them.

“It’s my privilege to represent the wonderful, multi-ethnic, multi-cultural Southside of Glasgow. I stand with them, always.”

The First Minister had visited St Albert’s Primary School to take part in a virtual assembly led by Keep Scotland Beautiful and to hear about the children’s daily live lessons on climate related topics.

Nicola Sturgeon visit to Glasgow school for Climate Action Week
Nicola Sturgeon spent time with pupils at the school (Andrew Milligan/PA)

The statement tweeted by the school also said: “Our motto is Creating Conscience Led Communities. We will continue to embed this in all our practice.

“We urge all our colleagues to embrace equity in all policy and practice and stand as active allies with anti racist and culturally responsive practice.

“We are sending love and hope it touches the hearts of those who live in hate. Thank you for your support.”

Others also tweeted their support, including Scottish Greens co-leader and Glasgow MSP Patrick Harvie who said: “Solidarity with the pupils and staff at @StAlbertsG41 who have been subjected to a torrent of racist abuse.”

Scottish Labour leader and Glasgow MSP Anas Sarwar tweeted: “Sending love and solidarity. No place for hate or racism – regardless of who it is from or who it is to.”