The Long Island Rail Road said buses will replace the two midday trains Wednesday on the Ronkonkoma Branch at Mattituck, Southold and Greenport.

The service change is caused by the need to repair the railroad crossing at Silvermere Road in Greenport, the LIRR said.

Silvermere Road will be closed where the tracks cross the road from 6 a.m. to 7:30 p.m., the LIRR said.

advertisement | advertise on newsday

Eastbound riders who usually take the 10:44 a.m. from Ronkonkoma will take buses to Mattituck, Southold and Greenport, the LIRR said.

The 12:42 p.m. westbound train from Greenport will originate at Riverhead at its usual time of 1:21 p.m., and customers can board buses at Mattituck, Southold and Greenport 12 minutes earlier than the scheduled train time and connect at Riverhead, the LIRR said.