DUBLIN -- Lanes were cleared for traffic more than two hours after a pair of big rigs collided Thursday morning, injuring two and turning Interstate 580 into a parking lot during the morning commute, the California Highway Patrol said.

The collision happened at 5:11 a.m. near the interchange of westbound Interstate 580 and northbound I-680, closing two lanes on I-580 for more than two hours.

All lanes were cleared by 7:39 a.m., but by that time traffic was backed up for miles and the morning commute from Dublin into San Francisco was expected to take close to two hours, the CHP said.

The accident happened when one big rig rear-ended another, leaving the drivers with minor injuries. The CHP shut down two lanes on I-580 at 5:25 a.m. just east of the I-680 interchange, and traffic backed up for several miles and came to a virtual standstill, the CHP said.

Two hours later, tow trucks had moved the trucks out of the lanes and Caltrans had cleaned up oil that was spilled in one of the lanes.

Contact Rick Hurd at 925-945-4789 and follow him at Twitter.com/3rdERH.