At least four students walked out of professor Lawrence Rosen's lecture on Tuesday

A white Princeton University professor had several students walk out of his class after he allegedly refused to stop using the n-word during a lecture.

In his Tuesday class, titled Cultural Freedoms: Hate Speech, Blasphemy and Pornography, professor Lawrence Rosen asked students what would be worse, a white man punching a black man or a white man calling a black man the n-word, the Daily Princetonian reported.

The 76-year-old anthropology professor used the racial slur two times after the initial question, students in the class told the university paper.

'All the black students were looking at each other, as if asking whether he actually said that,' student Destiny Salter said.

Things came to a boil when Malachi Byrd, a black, third-year student, allegedly asked Rosen if he was going to keep using the n-word.

'Yes, if I think it's necessary,' the professor replied, per the Daily Princetonian.

Things came to a boil when Malachi Byrd (above) allegedly asked Rosen if he was going to keep using the n-word, and walked out of the class when the professor said he would

The Princeton University class in question is called Cultural Freedoms: Hate Speech, Blasphemy and Pornography

Byrd then walked out of the class, followed by three other students.

Senior Devyn Holliday told the university paper that Rosen defended his choice of words after the student walk-out.

He allegedly said: 'It's supposed to deliver a gut punch, so that's why I used it.'

Byrd eventually returned to the lecture and he and other students continued to press Rosen for an apology, to which he allegedly replied: 'I don't think I need to apologize; I did not oppress anyone.'

Students E Jeremijenko-Conley and Destiny Salter said they filed a complaint with the university's director of studies for Rockefeller College at Princeton.

Director Justine Levine told the Princetonian in an email that she will work with students to resolve the issue.

Many on social media said students should've expected to be shocked in Rosen's class

One student, Kevin Ramos, plans on dropping the class after the incident.

'The professor saw how uncomfortable the students were with his language,' said Ramos. 'If he doesn't respect the students' opinion, then it's not worth learning from him,' he said.

The course asks 'how civility relates to free speech, how codes may channel expression without oppression, and how cultural difference can relate to shared values and orientations,' according to its description on the university website.

One Twitter user took issue with the student walking out of the class, calling them 'snowflakes'

Twitter user Mack Jackson, on his part, agreed with the student-walk out

Many took to social media to disagree with the students who walked out, calling them 'snowflakes' and asking what they expected to hear in a class about hate speech.

One Twitter user said: 'Given the title of the course, people should have been prepared. Not every class is designed to make you comfortable. They are not children anymore.'

Another added: 'So students don't expect to be shocked in a class called, 'Cultural Freedoms: Hate Speech, Blasphemy and Pornography'? How can wer have an honest conversation?'

According to the university's website, professor Rosen was set to retire last year after 40 years of teaching.