A 31-year-old St. Petersburg man who threatened to "slaughter" his coworkers via email was arrested hours later on Monday, according to the Pinellas County Sheriff's Office.

Dorian Golej was fired by Raytheon Corp. on March 21 after the company found he had created a hostile work environment, according to the Sheriff's Office. Then on Monday from 2 to 3 a.m., deputies said he threatened to massacre his former coworkers in emails he sent to his own attorney. The attorney alerted security at his client's former employer at 7887 Bryan Dairy Road in Seminole.

"No choice but to contemplate killing," Golej wrote in an email, according to his arrest report. "I probably would have slaughtered everything one day, I think about it every day."

Raytheon on Monday placed the facility on lockdown and called the Sheriff's Office. Deputies determined that Raytheon's campus was safe and went to find Golej at his apartment at 426 93rd Ave. N in St. Petersburg.

When they got there, deputies said Golej wouldn't come out of the apartment to talk to them. Eventually he did, then he was arrested on a charge of making threatening communications or threats of mass shooting. Deputies said he admitted to sending the threatening emails.

"I feel like killing him," Golej told deputies, according to the Sheriff's Office, though it was unclear exactly who he was talking about. "I would have slaughtered that place, turn it into a bloodbath."

Golej also met the criteria to be detained under the Baker Act, the state law that allows someone to be involuntarily held for a mental health evaluation. Though he does not appear to possess any firearms, the Sheriff's Office said it also filed for a risk protection order, which bars Golej from legally obtaining or possessing weapons or ammunition.

Records show he was arrested in 2013 on a charge of domestic battery that was later dropped. In 2016 he spent 13 days in the Pinellas County jail on a charge of misdemeanor disorderly conduct. He was being held in the same jail on Tuesday in lieu of $500,000 bail.

Times senior news researcher Caryn Baird contributed to this report.