The Long Island Expressway has reopened near Exit 50 after a truck carrying topsoil overturned in the middle of a soggy evening commute Wednesday, snarling traffic for hours, police said.

Suffolk police said the truck was headed eastbound when it overturned near Exit 50 in Melville. Police said the call came in at 5:39 p.m.

Officials had kept one lane open for a while to allow drivers to pass, but then closed all lanes while they worked to upright the truck.

advertisement | advertise on newsday

By 9:45 p.m., all lanes had reopened at Exit 50, police said.

Traffic cameras showed that eastbound traffic on the LIE had backed up to about Exit 46 in Plainview because of the overturned truck.