The locomotive initially caught fire but the flames were eventually extinguished, according to a Union Pacific spokesperson.
The derailment happened around 7:30 a.m. near 5th and K streets in Colton, on a stretch of track just south of the 10 Freeway, east of Rancho Avenue. Police and firefighters responded to the scene.
There was just lumber on board, but the Colton Fire Department had to quickly put out a small fire that started near one of the engines.
Within a couple of hours, contractors were already on scene working to clean up the mess.
Union Pacific officials added an unknown amount of diesel was spilled.
A contracted worker who was assisting in the cleanup was injured in the process and was taken to a hospital.
"They were trying to move that car over there, and they put the hook on a spot that wasn't real strong on the car, so the tractor ripped it off and the chain hit him, so I'm pretty sure it broke his arm," a witness said about how the injury happened.
No other injuries were reported.
The derailment happened at a point where some tracks take a left-hand turn to go under the freeway and head north, while other tracks continue east. It's unclear which direction the train was headed.
There are several homes that back right up to the tracks, but they weren't impacted.
The cause of the derailment remains under investigation.