A Rutgers University professor who teaches a course called “Politicizing Beyoncé” was taken by New York Police Department officers to a New York City hospital for a psychiatric evaluation after a student alerted campus police to his tweets threatening to kill white people.

The NYPD took Kevin Allred to Bellevue Hospital from his Brooklyn home after the Rutgers Police Department contacted them, NBC 4 New York reported. He has since been released.

“Rutgers police told them I’m a threat based on political statements I’ve made on campus and on Twitter,” Allred tweeted after the cops arrived at his home. “And this is for exercising my … First Amendment rights.”

“I’m being labeled a threat and put in a psych hospital. Trump’s crackdown on free speech has absolutely begun,” he added.

Allred posted a slew of anti-Trump tweets since President-elect Donald Trump’s victory last week, including tweets showing a flag-burning and commenting about gun control.

But it was a tweet and comments made in class about killing white people that prompted campus police to contact the NYPD to conduct a “wellness check,” the New York Daily News reported.

Allred tweeted, “will the 2nd amendment be as cool when i buy a gun and start shooting at random white people or no…?” He later revised the tweet.

A spokesman for Rutgers said the university responded to a student complaint about Allred.

He also tweeted that all students should participate in a walk-out planned for Rutgers’ New Brunswick campus protesting Trump’s win.

Thousands of students marched to protest Trump at Rutgers and at more than 80 colleges and universities Wednesday.