A Maryland man busted for threatening a mass shooting at his workplace had 146 guns stashed at home, including an AK-47, according to authorities.

Mark Rutkowski, 54, terrorized staff at a machine shop in Pasadena by threatening to “shoot this whole place up” — and even listing the order in which he’d kill his colleagues, according to police reports.

Officers found the arsenal at his home Tuesday when serving an extreme risk protection order after his arrest as part of the state’s red-flag law, according to the Capital Gazette.

The cache of weapons included handguns, rifles, shotguns and at least one assault-style rifle. Rutkowski’s 83-year-old father took credit for many, claiming he was a gun collector, the paper said.

Appearing Wednesday in district court in Anne Arundel County via video link from jail, Rutkowski insisted he was “just kidding” with his threats, according to the Capital Gazette.

“I just said to one of my best friends, ‘I wish y’all were dead,’” he told the court, according to the report.

However, staff at Gischel Machine Shop were genuinely terrified, saying Rutkowski had made previous threats while suggesting he had mental health issues, the paper said.

Assistant State’s Attorney Colin Kelly also told the court there was clear pre-planning because Rutkowski had listed “with specificity who he’s going to take out first.”

“He’s an absolute danger to the public,” the prosecutor said, according to the paper.

Rutkowski was ordered held without bond on one count of making a threat of mass violence.

“We have the threat and we have the means,” District Judge Richard Duden III said of the risk.