A Florida police detective resigned last week after he said there would be an "active shooter situation" if he didn't get the job he wanted, officials said.

Steve Bergren submitted his resignation to the Tarpon Springs Police Department, located in Pinellas County, after he made the comment on Aug. 5 to a fellow detective, which Police Maj. Jeffrey Young said made the co-worker's "hairs on the back of his neck stand up."

FLORIDA MOM INSISTS HER SON WHO ALLEGEDLY THREATENED MASS SHOOTING IS 'JUST A LITTLE KID' MAKING JOKES

Bergren, according to the Tampa Bay Times, wrote the police chief a letter explaining he was joking and that he “failed to appreciate how recent tragic events could lead to a statement referencing an active shooter being misperceived” — but the excuse didn't fly.

“In his letter, he says it was in jest, but in hindsight it was ill-advised," Young told the news outlet. “In today’s society, you just can’t say something like that and not be held accountable for it.”

OKLAHOMA WOMAN, 18, THREATENED TO 'SHOOT 400 PEOPLE FOR FUN' AT FORMER HIGH SCHOOL, OFFICIALS SAY

The police major said it doesn't make sense for law enforcement to ask that the public look out for "red flags" – like threatening an "active shooter situation" – while ignoring such comments close by, despite where it comes from.

Bergren, an officer with the force since 2008, apologized.

“I never imagined when the statement was made that it would be perceived ... as a potential threat to our shared workplace," he wrote to the police chief. But the detective who reported the comment told the department "Bergren made this statement in a stoic manner and not giving any indication that this was a joke."

CALIFORNIA MAN WARNS OF FAKE MASS SHOOTING AT COUNTY FAIR SO HE WOULDN'T HAVE TO GO WITH PARENTS, POLICE SAY

Bergren was placed on leave and an investigation was conducted, uncovering that Bergren had made a similar comment on May 10 — he told co-workers about what might happen if he wasn't appointed to the Pinellas County Sheriff’s Office’s drug task force.

CLICK HERE TO GET THE FOX NEWS APP

Those co-workers thought Bergren was joking. "He is stoic and they thought he just has a dry sense of humor," Young said.

Per Tarpon Springs city rules, Bergren's comments would be considered a workplace threat, according to the Times. The department's investigation will be sent to the Florida Department of Law Enforcement’s Standards Commission for further review.