Jefferson Parish Sheriff’s Office Sergeant Josh Collins said he was discriminated against and “ostracized” for wearing his police uniform, including a sidearm, to class, in a Facebook post on Wednesday.

Collins has been enrolled at Loyola University in New Orleans for eight years. While he typically shows up to class in everyday clothes, last week he didn’t have time to change out of his police uniform or remove his firearm before attending his “Law and Morality” class.

Shorty after Collins entered the classroom, a student complained, prompting the professor to call the police. The police told the professor Collins wasn’t breaking any laws by carrying his weapon or wearing his uniform to class.

In his Facebook post, Collins pointed out the irony that the police were called on a police officer.

“How ironical and dumbfounding is it that you called the police to tell them that there was a police officer sitting in your class,” he wrote.

Collins also said he now feels the need to hide his profession “in order to obtain a fair education.”

You can read the full post below:

The university issued a statement apologizing to Collins, and claimed the whole incident was a “misunderstanding” (via Fox 8 News):