Westbound lanes of the Long Island Expressway in Melville reopened during Tuesday’s morning commute after being closed for more than five hours because of an overturned tractor-trailer.

The state Department of Transportation said in an email alert that the westbound LIE at Exit 49 north opened just before 8 a.m.

Debris from the overturned tractor-trailer closed the expressway as early as 2:38 a.m.

The closure was between Exit 49S, Route 110, and Exit 48, Round Swamp Road, according to the state agency’s website, 511ny.org.

Suffolk County police said the tractor-trailer carrying garbage was entering the westbound LIE from the service road ramp at Exit 49 when it overturned, spreading debris across the expressway.

A spokeswoman said cleanup crews needed time to empty the tractor-trailer’s load because the vehicle was too heavy to lift up. Once it was emptied and lifted upright, the tractor-trailer was then removed, she said.

advertisement | advertise on newsday

The driver, who was not injured, was issued tickets for speeding and failure to maintain his lane, police said.

During the delay, all westbound traffic was diverted to Exit 49 north; that exit ramp also at one point during the closure reduced from two lanes to a single lane of traffic, according to the website.

Traffic was also slow on the westbound Southern State and Northern State parkways and Sunrise Highway during the morning commute.