Image copyright CBS Image caption Marlon Anderson used the n-word when asking a student to stop calling him the racial slur

A black security guard who was fired from a school in the US for asking a student not to use a racial slur has been reinstated.

Marlon Anderson repeated the n-word while asking a black pupil who had addressed him with the epithet to stop.

The sacking in Wisconsin sparked protests among students and staff and a grievance from the officer's union.

Mr Anderson celebrated after being reinstated on Monday, sharing "I'm back!!" on his Facebook page.

He will be placed on paid administrative leave while his return is negotiated.

The incident started on 9 October when he was asked to help remove an unruly teen, who then began directing racial abuse at him.

Mr Anderson said the student had directed the word at him about 15 times. He responded by telling the student not to call him the word, himself repeating it several times.

Image copyright CBS Image caption West High School in Madison, Wisconsin

He was sacked from West High School in the city of Madison a week later, sparking community outrage.

Scores of students staged a walkout on Friday in the Midwestern state's capital city to demonstrate against the dismissal.

Madison Metropolitan School District cited its zero-tolerance policy on derogatory slurs by staff members as a reason for the dismissal.

On the decision to reinstate Mr Anderson, district supervisor Jane Belmore said the district had "heard from our community" and was trying to "live up to the commitments we've made to be allies with our students and be an anti-racist school district", according to NBC News.

Before the firing, Mr Anderson had worked for the school district for the last 11 years.

Image copyright CBS Image caption Students and staff protested Mr Anderson's dismissal

Mr Anderson said he felt he had the right to not be called that word.

"My father was called this word, my grandmother, my grandfather and keep going down the family line," he said.

"We were all called this word, and not one of them could say, 'Don't call me that.' I can."

Last year at least seven Madison Metropolitan School District employees were dismissed or resigned after using racial slurs in front of students.

You may also be interested in...

Former US President Barack Obama used the n-word during an interview in 2015 to argue that the US has yet to overcome its issues with racism.