A truck crash on Perth's Stirling Highway Bridge has been cleared after it closed the road in both directions, banking up traffic for kilometres and leading to major delays near Fremantle.

The truck spilt diesel over the road after colliding with a car about 10:00am on Friday.

Loading

The accident caused heavy congestion in the area, including on Stirling Highway, Leach Highway and Canning Highway.

At one point, hundreds of trucks heading into Fremantle Port were banked up along Leach Highway for several kilometres, and other heavy vehicles trying to leave the port were also forced to wait.

Motorists were advised by Main Roads to avoid the area and seek an alternative route, with long detours put in place.

The truck was towed off the bridge about 12:30pm as emergency services worked to clean up the diesel spill.

The bridge was eventually reopened about 2:00pm.

Main Roads said traffic remained heavy in the area and warned motorists they could still expect delays.

No-one was seriously hurt in the crash.