A train travels eastbound on the Long Island Rail Road's...

A train travels eastbound on the Long Island Rail Road's Port Jefferson Branch in Port Jefferson Station on Feb. 18, 2016. Credit: Newsday/John Paraskevas

Crews on Wednesday finished repairing a heat-related condition on the train tracks near Northport, a problem that led the LIRR to replace trains with buses between Port Jefferson and Huntington, the Long Island Rail Road said.

The metal rails near the Northport train station on the Port Jefferson branch were "slightly out of alignment" because the high temperatures had caused the metal to expand, spokesman Aaron Donovan said. 

"The rails need to be very precisely calibrated," he said. "There's not a lot of room for being out of the normal, exact geometry. You wouldn't notice it by looking at it with the naked eye. It doesn't rise to that level."

Shortly after midnight, the Long Island Rail Road tweeted that the work was done.

LIRR had tweeted around 9 p.m. that trains would be replaced by buses in both directions between Port Jefferson and Huntington. One eastbound train and one westbound train were canceled, the LIRR tweeted later in the night.

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Sean Manaea ride-along ... Japanese head spa ... Get the latest news and more great videos at NewsdayTV

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME