Several students walked out of the class, with two filing complaints at Princeton University over n-word iStock

A Princeton University professor has cancelled a course he teaches on hate speech after several students walked out of one of his classes after he repeatably used the n-word.

In his anthropology class titled, Cultural Freedoms: Hate Speech, Blasphemy, and Pornography, Professor Emeritus Lawrence Rosen asked students whether a white man punching a black man was more provocative than if "white man walks up to a black man and calls him n****r".

Rosen is reported to have used the racial slur repeatedly during the talk, resulting in several pleas from students urging him to stop.

Rosen is said to have used the offensive word in order to provoke students' reactions on "oppressive symbolism", according to student paper Daily Princetonain.

Several students subsequently walked out of the class, with at least two filing a complaint with school officials.

Malachi Byrd, one of those who walked out, told The Tab: "Prof Rosen started the class by telling us he was retired and felt his most empowered to say anything he desired.

"He had intentions on having a provocative class and about 10 minutes into class unnecessarily dropped the n-word multiple times.

"After multiple requests from students to stop and departures from the class, he himself admitted that he didn't need to say it but wanted us to channel that passion because other people feel the same way about what's important to them."

The University defended the professor in a letter to students. It said: "The values of free speech and inclusivity are central to Princeton University's mission and critical to the education we provide to our students.

"The conversations and disagreements that took place in the seminar led by Professor Rosen are part of the vigorous engagement and robust debate that are central to what we do."

The school added it would continue to "to look for ways to encourage discussions about free speech and inclusivity with the students in Professor Rosen's class and the campus community more broadly".