The Long Island Rail Road said it was operating on or close to schedule systemwide after a rail problem in an East River tunnel had caused delays, cancellations and some trains being diverted during Friday’s morning rush hour.

The LIRR said it was on or close in an email alert at about 10:30 a.m.

The problem was discovered at about 7:40 a.m., according to spokesman Aaron Donavan, and was resolved at about 9:15 a.m.

During that stretch, there were systemwide delays in and out of Penn Station, followed by some scattered delays averaging 10 to 20 minutes and then exclusively westbound delays of up to 20 minutes, the LIRR said.

advertisement | advertise on newsday

Four trains were canceled and two were diverted during the more than 90-minute stretch, Donavan said.

Donovan could not immediately identify the rail problem other than it had been resolved.