A man who was armed with a loaded gun and was wearing a bulletproof vest on Friday at Union Station had stolen a New York Police Department duffle bag full of SWAT equipment, according to Cook County prosecutors.

Isaiah Malailva, 21, was charged with felony aggravated unlawful use of a weapon with body armor, court documents show.

Malailva; of Redding, California; was arrested at 9:30 a.m. at the Loop station at 225 S. Canal St., after police dogs sniffed explosive residue in the unattended bag, prosecutors said.

Officers found materials with NYPD SWAT patches inside, and attached to the bag was a bus ticket with Malailva’s name on it, prosecutors said.

Malailva, who was traveling through Chicago, was wearing body armor and was carrying a loaded .9 mm handgun, according to prosecutors, who said he didn’t legally own the gun.

Cook County Judge John Fitzgerald Lyke Jr. set Malailva’s bail at $100,000.

“This is troubling, to say the least, in light of what’s happening in our country,” Lyke said in court Saturday.

Lyke ordered Malailva, who has criminal history in Florida, to stay in Cook County until the case is resolved.

If Malailva doesn’t post bond, he’ll be held at Cook County Jail until his next scheduled court appearance on Friday.