(CNN) A University of Oklahoma professor has apologized after saying "OK, boomer" is the same as saying "n***er," the university's student newspaper reported.

When a student made the comment Tuesday that journalists must keep up with younger generations, the professor said that was "the equivalent of saying 'OK, boomer' to him," the OU Daily reported.

"Calling someone a boomer is like calling someone a n***er," the professor then said, according to the paper, which said some of its staffers were in the class and witnessed the exchange.

The professor apologized in an email to students Tuesday evening, the OU Daily said.

"I realize the word was hurtful and infuses the racial divisions of our country, past and present," the professor wrote, according to the paper. "Use of the word is inappropriate in any — especially educational — settings."

Read More