A Canadian Pacific freight train carrying crude oil through Wisconsin derailed on Sunday, knocking 13 cars off the tracks, spilling oil and leading 35 homes to be evacuated, in the state's second derailment in two days.

No one was injured in the 2 p.m. incident in Watertown, about 80 kilometres west of Milwaukee, and workers stopped the leak, which company spokesman Martin Cej described as minor.

Late Sunday night, the company said 35 homes had been evacuated as a precaution, and that it had reserved hotel rooms for the families who lived in them.

In the derailment, one of the cars was punctured and oil spilled out onto the soil, said spokesman Jeremy Berry. The spill was contained and the oil did not reach any waterways, he said.

Earlier on Sunday, the BNSF Railway Co said its crews had stanched the flow of ethanol from a freight train that derailed on Saturday about 220 kilometres away in Alma, Wisconsin, after thousands of gallons of the denatured alcohol leaked into the Mississippi River.

In that incident, 25 cars derailed in the rural community close to the Minnesota border, at about 8:45 a.m. local time on Saturday, the railroad said. No injuries were reported.

The train was hauling a variety of freight, including empty auto racks and tankers of ethanol. Five of the tanker cars released ethanol into the Mississippi, the company said. Four of them each leaked between five and 500 gallons, while the fifth released an estimated 18,000 gallons before crews stopped the flow on Saturday.

APTOPIX Train Derailment Wisconsin

Train cars from a BNSF Railway train lie overturned outside of Alma, Wis., after derailing on Saturday, Nov. 7, 2015. (Aaron Lavinsky/Star Tribune/Associated Press)

"BNSF is continuing to monitor for environmental impacts and to work on scene with the multiple federal and state agencies involved," the company, a unit of Warren Buffett's Berkshire Hathaway Inc, said.

In September, part of BNSF's main track in rural South Dakota was put out of service when seven cars of a 98-car train carrying ethanol derailed and started a fire.

In Wisconsin, crews placed a containment boom along the shoreline of the river and started to pump the remaining product out of the cars, BNSF said on Sunday.

Work on repairing the tracks can begin once the derailed cars are put upright.

The railroad said it expected the track to return to service Monday morning. Video images from the BNSF incident showed train cars sprawled across tracks on a narrow causeway that slices through the middle of the river, with water on either side.