A black security officer in Wisconsin who was fired after telling a black student not to call him the N-word has gotten his job back, officials said Monday.

The firing of Marlon Anderson was reversed after student protests and a grievance was filed last week by Anderson’s union with his school district in Madison.

Students and faculty from Madison West High School, including teacher Sarah Quinn, with sign, rally in support of the school's recently-fired security guard Marlon Anderson outside the Doyle Administration Building in Madison, Wis. on Oct. 18, 2019. John Hart / Wisconsin State Journal via AP

District supervisor Jane Belmore did not explicitly say why the firing was rescinded in a statement Monday, but she said the district had “heard from our community and grappled” with how “to live up to the commitments we’ve made to be allies with our students and be an anti-racist school district.”

She added that she was “prepared to take appropriate steps in the current situation” and “mitigate any harm that was caused.”

Anderson celebrated on Facebook, saying: “I’m back!!”

He added that he would remain on paid administrative leave while his return to the district was negotiated.

Anderson had worked with the Madison Metropolitan School District for 11 years when he was fired. He told NBC News that school officials terminated him because of a zero-tolerance policy on the use of derogatory language by district staff.

Anderson has said that after a black student repeatedly called him a n-----, he asked the student to stop, using the same language.

"My understanding of the policy was white staff shouldn’t use the N-word under any circumstances," Anderson said. "But I had no idea me being called the word and me telling the student not to call me the word would get me fired."