A semi-truck loaded with ice cream flipped on its side in Encinitas early Tuesday morning, leading to a daylong traffic nightmare for drivers taking southbound Interstate 5, authorities said.

The crash occurred shortly after 5:50 a.m. near Encinitas Boulevard, the California Highway Patrol said. No one was injured, but the crash caused a fuel leak that appeared to be contained to the traffic lanes, the CHP said.

A traffic alert was issued shortly after 6 a.m. because the overturned truck and trailer were blocking several lanes, a CHP spokesperson said. By 10:30 a.m., the CHP reported that the big rig had been uprighted, and a few hours later they had reopened the HOV lane and two inside lanes.

But cleaning up the crash site took a long time, requiring the outside two lanes of the freeway to remain closed to traffic for several more hours. By late afternoon, officials were anticipating the rest of the lanes could reopen by 6 p.m.

“Apparently there’s a lot of diesel fuel they have to clean up in addition to all the guard rail damage,” CHP spokesperson Hunter Gerber said.

Traffic maps indicated the slowdown on south I-5 started around Carlsbad.

It wasn’t clear what caused the crash, Gerber said.