LIRR trains were back on schedule more than two hours after a third rail power outage led police to restrict access to Penn Station due to overcrowding Friday night, the MTA said.

The power shut down about 7:30 p.m. when a Babylon branch train leaving Penn Station came in contact with the third rail and damaged it, said Salvatore Arena, spokesman for the Metropolitan Transportation Authority.

Long Island Rail Road service between Penn and Jamaica stations was suspended, but limited service in both directions resumed by 8:20 p.m., followed 10 minutes later by full access to Penn, LIRR said.

advertisement | advertise on newsday

At about 10 p.m., the LIRR tweeted that trains were on or close to schedule.

What caused the eastbound train to hit the third rail is still under investigation, Arena said.