The man behind the Orlando massacre was a bloodthirsty bigot who “talked about killing people all the time” — but his employers refused to turn him in because he was Muslim, a former co-worker said.

“This guy was unhinged and unstable,” Daniel Gilroy, an ex-Fort Pierce cop who worked with Omar Mateen as a private guard for G4S Security, told Florida Today.

“I never heard him refer to anybody who was black or gay as anything else but ­n—ers and queers.” - Daniel Gilroy

In several interviews on Sunday, Gilroy recalled how he personally expressed concerns about Mateen’s demeanor — including his threats and use of slurs — during his time at G4S.

“I never heard him refer to anybody who was black or gay as anything else but ­n—ers and queers,” he told the Palm Beach Post.

But he claimed his bosses refused to take action because Mateen was a Muslim.

“The company wouldn’t do anything,” Gilroy said. “I quit because everything he said was toxic.” Company officials refused to comment.

Gilroy said that before he left, he was badgered with hateful text messages from Mateen, sometimes 20 to 30 times a day.

“He went boiled-rabbit crazy on me,” he said.

Gilroy also described how it didn’t take much to set Mateen off.

“He was just agitated about everything, always shaken, always agitated, always mad,” he told The New York Times. “He talked about killing people all the time.”

Gilroy added that while he wasn’t surprised by Mateen’s actions on Sunday, he felt bad about not being able to do more to stop him during their time together.

“I kind of feel a little guilty that I didn’t fight harder,” he said.

“If I didn’t walk away and I fought, then maybe 50 people would still be alive today.”

What you need to know about the worst mass shooting in US history: