RAYMOND, Minn. - Residents in this small west-central Minnesota town were awakened in the middle of the night early Thursday by cellphone alerts and first responders pounding on doors warning them to evacuate after a train carrying ethanol and corn syrup derailed and caught fire.

Flames and thick smoke billowed into the air as 22 cars jumped the track on the rail line owned by BNSF on the west side of the Kandiyohi County community, about 110 miles west of the Twin Cities, just after 1 a.m.

"We take full accountability for this," said Katie Farmer, president and chief executive of the Fort Worth, Texas-based railroad. "We work very hard at prevention of these types of incidents at BNSF."

Railroad officials have not said what led to the derailment, and a spokesman from the Federal Railroad Administration said an investigation could take months. Investigators from the National Transportation Safety Board were headed to the scene Thursday.

"Accident investigations vary considerably in length and duration, but in general we seek to complete them within six months," said Warren Flatau, the railroad administration's deputy director of Public Affairs.

No one was hurt when the 117-tank cars left the tracks, but it did frighten residents in the town of about 800 people. By midday, the evacuation order was lifted and they were allowed to return home.

'That's all of Raymond'

First responders from at least 15 agencies rushed to the scene and went door to door in the night to tell residents living near the crash they needed to leave the area.

"We knew very quickly what was on the train," said Kandiyohi County Sheriff Eric Tollefson. "We knew there was no great hazard, but the recommended evacuation area was a half-mile from the fire. Well, that's all of Raymond."

Christine O'Leary, who lives less than a block from the derailment, was in a deep sleep when her dogs started barking and firefighters pounded on her door. She packed up her two young children and drove to Montevideo to stay with a friend.

"I put my hands over my head and said, 'This can't be happening,'" she said. "I wondered if something like this would happen."

O'Leary said the air smelled like "burning plastic." She said she saw a few tankers fully engulfed in flames as she drove safely out of town.

Others were awoken to cellphone notifications with a message to evacuate to Prinsburg, a small town about 8 miles south.

"I was in a fog. I didn't know what the heck was going on," said Pam Haugen, 67, who lives in the El Ca Ba Apartments in Raymond. "I was afraid we were going to lose our apartment — with an explosion and all the fumes. I don't want to start all over again with all my belongings."

Darwin Heida, 81, said he's lived in his Raymond house since 1965 and hadn't seen anything like it before, even in his 24 years as a volunteer firefighter. He said he couldn't smell any fumes but the fire lit up the night sky. "You could see the actual flames well above the tree lines," he said.

More than 150 residents took refuge at the Central Minnesota Christian School in Prinsburg, including Haugen and four others who were taken there by ambulance because they didn't have a vehicle.

Jon De Groot, superintendent of the school, said he wasn't expecting that many people and had set up only a few tables. But as more people arrived, he put up more tables, mats and provided coffee. To pass the time, some played games. A nearby church served breakfast to about 100 people who were still at the school hours after the derailment.

"I'm proud of how our community banded together," De Groot said. "We were blessed to be a blessing. Everybody got along."

The Red Cross was also on the scene, as was Gov. Tim Walz, who said he was impressed by the sense of calm and order. He praised BNSF for its quick response.

"It should not go unnoticed with Burlington Northern, this is the response we expect," the governor said during a news conference after touring the wreckage. "Be honest with people. Come out here and tell us what happened."

Occasional flare-off

The mixed freight train included product from Chicago-based ADM's corn processing facility in Marshall, Minn., when it left the tracks. Four cars carrying corn syrup and four carrying ethanol tipped over.

Train cars continued to leak midday Thursday as cleanup began. But with the ground frozen, the liquid should be able to burn off without anything getting into the water supply, the governor said.

The Minnesota Pollution Control Agency said staffers were on the scene, evaluating the scope, scale and effects to the air and to surface waters, said spokeswoman Andrea Cournoyer.

She said the agency will advise on necessary environmental cleanup measures.

No hazmat team was dispatched, but the State Fire Marshal division sent a fire service specialist to the scene to provide additional water to help extinguish the fire, said Amber Schindeldecker, spokeswoman for state Homeland Security and Emergency Management.

"You might see some flare-off from time to time. There's nothing to be alarmed about," Matt Garland, vice president of operations with BNSF Railway. "Ethanol will burn off and we're monitoring the air and we're monitoring all the conditions around the derailment site."

Rebecca Radtke described the derailment scene as a "flaming orange ball" during the evacuation. But as she walked her dog Zeus near the site after returning home, things were relatively calm. A few flames jumped from the pile of jumbled black rail cars a few hundred feet to the south. The biting wind blew away any remnants of smoke or fumes.

"I thought maybe the first couple houses would catch fire," she said of three houses closest to the tracks. "Thank God it didn't spread to our neighbors' houses."

Jessica Hanson, 40, returned to her house just north of the tracks around 12:30 p.m. — along with her kids and two dogs — after evacuating to her parents' home in the middle of the night. Occasional flames made her a little nervous. "It's a little close to home," she said.

The Federal Railroad Administration said it would send officials to the scene.

For hours, travel was not advised in the city as the large fire raged. The main road in and out of town, Hwy. 23, was shut down between Chippewa County Road 1 and Kandiyohi County Road 1, and it was not expected to reopen until Friday.

The derailment in Raymond comes after several other incidents across the country in recent weeks, including the high-profile crash in East Palestine, Ohio, where a train carrying hazardous materials derailed on Feb. 3.

There were at least 1,164 train derailments across the country last year, according to data from the Federal Railroad Administration. That means the country is averaging roughly three derailments per day.

Outrage and concern over the Ohio derailment spurred a bipartisan bill to be introduced in the Senate called the Railway Safety Act. Democratic President Joe Biden put out a statement touting the bill, urging earlier this month for lawmakers "to move quickly to advance these commonsense rail safety measures and send me a bill to sign into law."

The legislation has not passed out of the Senate. But the offices of Democratic U.S. Sens. Amy Klobuchar and Tina Smith said Thursday the lawmakers are co-sponsoring the legislation. Klobuchar noted in an interview the bill would mean enhanced safety procedures for trains that carry hazardous materials, a two-person crew minimum and increased civil penalties over crashes.

"It's just telling that there's another train derailment," Klobuchar said while talking about Raymond and what Congress should do on rail safety. "And while the consequences of this appear to be contained, which is a really good thing, you don't know what the next one will be, and that's why we have to get better safety standards in place."

Staff writers Jennifer Bjorhus, Hunter Woodall and Christopher Vondracek contributed to this report.