Four train cars derailed at Front and Bonansinga Drive in Quincy Monday night.
Two cars had completely left the tracks and were laying on their side. Another car was angled up into the air and resting on one of the tipped cars.
Law enforcement taped off the area in case another car tipped over.
A spokesperson with the Quincy Police Department told KHQA the cars were carrying soybeans, which spilled when the cars derailed.
That spokesperson said a problem with the track switch caused the derailment and crews would begin clearing the scene early Tuesday morning.
The train briefly blocked the intersection, but the train was separated and traffic was able to drive through the area normally shortly after the incident.