The Long Island Rail Road said toward the end of Thursday’s morning commute that it was operating on or close to schedule after a switch issue had caused a stretch of delays on three branches.

Trains on the Oyster Bay, Port Jefferson and Ronkonkoma branches experienced delays averaging up to 20 minutes at one point, starting about 8:45 a.m.

advertisement | advertise on newsday

The LIRR posted on social media and sent an email that it was on or close to its schedules at 10:15 a.m.

The switch trouble was in Garden City, near the Merillon Avenue station, the LIRR said.