A small section of the William Floyd Parkway in Shirley will not be closed this weekend for construction after all, the Long Island Rail Road said on Friday, reversing its plans.

“We realize that William Floyd Parkway is a critical artery in the community,” the LIRR said in a statement.

Previously, the railroad said the closure — needed to repair a crossing for the Montauk branch — would have run from 10 p.m. Friday through 5 a.m. Sunday.

The agency said it will continue to work with localities to smooth any disruptions from the eventual closure, which has not yet been rescheduled.

“We’re postponing this work so that we can work even more closely with the County and community stakeholders to minimize any traffic disruptions,” the LIRR said.

However, other construction on the Montauk Branch, which will require travelers to use buses, will go ahead this weekend, the LIRR said.

Passengers going west toward stations between Montauk and Bellport will board buses to Patchogue, then transfer to connecting train service to points west.

advertisement | advertise on newsday

Buses will depart between 16 and 34 minutes earlier than normal train times.

Passengers going east of Patchogue will get off the train at Patchogue and board eastbound buses.

Riders were urged to allow up to 30 minutes of additional travel time.