A North Carolina man who fled that state after being charged with the sexual assault of a 13-year-old girl has been captured in New Jersey.

Law enforcement officials had tracked 27-year-old Thomas Feldheim to a New Brunswick motel in recent days, Deputy U.S. Marshal Michael Schroeder said.

They knocked on the door around 5 a.m. Friday and, after no one answered, broke down the door. Feldheim was lying on an inflatable bed on the floor, while an acquaintance was on the motel bed.

When authorities ordered Feldheim to put both hands in the air he refused. A marshal then shocked him with a stun gun — causing a loaded .22 caliber handgun to hit the floor.

Feldheim remained in the Middlesex County jail on Sunday, pending extradition to North Carolina. His acquaintance, whose name was not disclosed, was detained but later released.