Liverpool’s lord mayor has been stripped of his title after two months in the role for sharing a racist video in a private WhatsApp group.

Peter Brennan was asked to step down by the city’s elected mayor, Joe Anderson, after complaints that offensive material had been shared with other councillors on Monday night.

Anderson said he had been shocked and appalled by the incident, adding in a statement: “Racist language and behaviour is inexcusable and unforgivable in all its forms. The video is completely at odds with my values, the values of Liverpool city council and all who live and work across the city.”

Brennan, who was elected to the ceremonial position in May, described it as a “calamitous mistake”, the Liverpool Echo reported.

He said: “It was a very stupid thing to do, but honestly it was not meant to cause harm, I have reflected on it and can again honestly say I am appalled that I could have done so and that it has caused harm and will upset many people.

“The black community I have clearly offended will have lost confidence in me for making such a calamitous mistake, I clearly cannot represent our wonderfully diverse community if people are angry and upset with me.”

He said he understood his actions were “racist and offensive” and that they would “live with [him] always”.

Brennan, who represents the Old Swan ward for Labour, agreed to give up the role after talking to Anderson. The incident has been referred to the Labour party both regionally and nationally.

Anderson said: “The actions I have taken needed to be taken immediately [to] make clear that anyone, no matter who you are in politics, you will be held to account.”

Anderson also highlighted that the video had come to light on the 14th anniversary of the killing of the Merseyside teenager Anthony Walker.

Walker was murdered with an ice axe in an unprovoked, racially motivated attack on 30 June 2005.

Brennan is a patron of the Anthony Walker Foundation, which was established to promote racial harmony after the murder.

Liverpool city council said a replacement for Brennan would be announced shortly.