LOVELAND, Colo. — The locomotive of a cargo train derailed in northern Colorado early Wednesday, spilling hundreds of gallons of diesel, authorities said.

The Great Western Railway locomotive did not tip over when it went off the rails at a switch in the tracks but a fuel tank was punctured, the Loveland Fire Rescue Authority said in a Facebook post. The spill was contained and did not get into any waterways, it said.

No one was injured, Battalion Chief Kevin Hessler said. The other locomotive and three cars carrying sugar did not derail, he said.

The railway company is working with a hazardous remediation company to clean up the fuel and get the locomotive back on the the track, the fire rescue authority said.

This is the second train derailment in Colorado in just over a week.

On Jan. 30, an Amtrak train derailed after it crashed into a truck carrying milk at a northeastern Colorado rail crossing, badly injuring the engineer and sending three passengers to a hospital, authorities said.