A truck has spilt tonnes of hay across a busy inner-Melbourne thoroughfare, causing delays for morning commuters.

The Gippsland-bound truck rolled at 1:30am after hitting the Swan Street bridge in Richmond.

The truck was carrying 42 tonnes of hay, which was scattered across the road.

Crews worked for hours to clean up the scene.

Swan Street was closed between Punt Road and Church Street for a period during the morning peak, but has since reopened.

Tram services are also operating as normal after earlier diversions.

VicRoads thanked motorists for their patience and understanding.

The driver was not hurt.