A train hit the back of a garbage truck Tuesday afternoon while the truck sat in gridlock traffic, setting off a chain reaction crash.

No one was injured, said California Highway Patrol Officer Vaughn Cain.

At about 4:20 p.m., the southbound Union Pacific train, which was heading from Lathrop, Calif. to Los Angeles, struck the back of a Varner Brothers garbage truck at about 40 to 45 miles per hour at Snow Road and Golden State Highway. The truck was stopped on the railroad tracks in a position where the driver could not see the signal's flashing lights warning of the approaching train. But even if the driver could, the truck was stuck on the tracks because of traffic, Cain said.

"He didn't know what was going on until he was hit," Cain said.

When the truck was hit, it was pushed forward and hit a Nissan Ultima. The Ultima then hit a Dodge pickup truck. The garbage truck continued, veering off to the side and hitting a telephone pole. Some of the garbage truck's contents spilled out onto the road's dirt shoulder.

The train did not derail and its crew members were uninjured, according to Union Pacific spokesman Aaron Hunt. In an email sent Tuesday night, Hunt wrote that Union Pacific crews were heading to the scene to investigate the incident.

The train had minor to moderate damage to its engine. It had about 50 cars.

Of the fact that no one was injured, Cain said, "We're very lucky."