A man wandering a set of Long Island Rail Road train tracks sparked a manhunt and massive transit headaches for commuters trying to get to work Thursday morning, officials said.

The rail renegade was seen running into the LIRR tunnels near Penn Station just after 8 a.m., an MTA spokesman said.

Advertisement

Cops were called in to search for the man as the MTA terminated four trains coming into Penn Station from Jamaica, Queens.

Two other trains heading into Penn Station were diverted to Hunterspoint Ave., officials said.

Power had been shut off to the train tracks as a precaution.

“LIRR is experiencing westbound delays into Penn and customers can anticipate some trains to be canceled at Jamaica during the AM Rush,” the MTA said on Twitter. The agency said it would cross honor tickets.

The wanderer was caught and normal train traffic resumed by 10:30 a.m., but that did little to comfort LIRR riders stuck on trains as they made their way to work.

“Got diverted to Hunterspoint Ave, fun times!” tweeted Liz Rodriguez. “Now time to cram into the 7 train to transfer into the worst/biggest subway stations (Times Square or Grand Central, pick your poison) to take an even longer ride to work.”

ABC Eyewitness News reporter Stacey Sager, who found herself on one of the powered-down trains, said conductors were coming around to “check and see if anybody has any ‘issues’ while we sit here powerless in the tunnel.”

Her fellow commuters only had one response: “Uproarious laughter,” she tweeted.