A black security officer at a Wisconsin high school was fired for telling a student who is also black to stop calling him the N-word.

The firing of Marlon Anderson from West High School in Madison prompted some students to walk out in protest Friday morning and for school officials to say they will reexamine policies on the use of racial slurs in schools.

Anderson told NBC News on Friday that after a black student repeatedly called him a n-----, he asked the student last week to stop.

Marlon Anderson was fired from West High School in Madison, Wis., for telling an unruly student who called him the N-word several times not to call him the racial slur. Courtesy Marlon Anderson

This week, Anderson said he learned that school officials terminated his employment, citing a zero tolerance policy on the use of derogatory language by staff members.

"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."

Anderson said he worked in the Madison Metropolitan School District for 11 years and at West High School for 3½ years.

Anderson shared the news of his firing in a Facebook post Wednesday.

"Short story.... I get called a b---- ass n---- by a student, I responded do 'not call me a n----!' And I got fired," he wrote, adding that the district's response had surprised him.

Madison Teachers Incorporated, the union that represents teachers and support staff, said it filed a grievance Thursday seeking Anderson's reinstatement with full back pay.

Students at the high school held a walkout Friday morning in support of Anderson and marched to the district's administrative building. Videos posted to social media showed that teachers at the school also joined the walkout.

Anderson's son, Noah, 17, who is the president of the black student union, helped lead the protest.

The school board president said officials would review the district's policies.

"We've taken a tough stance on racial slurs, and we believe that language has no place in schools," the board president, Gloria Reyes, said in a statement.

The board will review its "underlying policies, and examine them with a racial equity lens understanding that universal policies can often deepen inequities," the statement said. "We will ask the community for help in that process."

District Superintendent Jane Belmore told NBC News in a statement Friday that since the incident occurred, "different viewpoints from many facets of our community are surfacing."

“Let me be clear, there is no doubt that language matters and racial slurs are harmful," Belmore said. "However, at this point, we have an opportunity to look more deeply into the response to the use of racial slurs in our schools."

The superintendent added that the district will act as quickly as possible on the appeal process for Anderson.

Anderson's Facebook post drew hundreds of comments of support, including from some who said they are former students and that Anderson had helped them feel safe.

Anderson said the response on social media and from the community have been overwhelming.

"It got me a little emotional, because to be honest, you don’t get that type of response from people until you’re in a casket," he said Friday. "But I had the opportunity to hear the effect that I’ve had on people’s lives."