BALTIMORE – A 21-year-old part-time construction worker obsessed with jihad was arrested Wednesday when he tried to detonate what he thought was a bomb at a military recruitment center — the second time in less than two weeks that an alleged homegrown terrorist was nabbed in a sting operation.

Antonio Martinez, a naturalized U.S. citizen who goes by the name Muhammad Hussain, faces charges of attempted murder of federal officers and attempted use of a weapon of mass destruction, according to court documents filed Wednesday.

The bomb he’s accused of trying to detonate was fake and had been provided by an undercover FBI agent. It was loaded into an SUV that Martinez parked in front of the recruiting center, authorities said, and an FBI informant picked him up and drove him to a nearby vantage point where he tried to set it off.

“There was never any actual danger to the public during this operation this morning,” U.S. Attorney Rod J. Rosenstein said.

Martinez was ordered held until a hearing Monday.