A University of Oklahoma professor has apologized after saying "OK, boomer" is the same as saying the n-word, 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."

CNN has reached out to the professor for comment, but has not heard back.

The university's interim president, Joseph Harroz Jr., condemned the comparison earlier in the day, saying "while the professor's comments are protected by the First Amendment and academic freedom, his comment and word choice are fundamentally offensive and wrong."

"The use of the most offensive word, by a person in a position of authority, hurt and minimized those in the classroom and beyond," Harroz said.

The term "OK, boomer," a viral meme among millennials and Generation Z, exploded last year on the TikTok social media app, where countless mocking videos are calling out what young people perceive as out-of-touch Baby Boomers and their patronizing opinions.