Federal investigators began Sunday to probe the cause of an Amtrak passenger train derailment that killed three people and injured dozens, resulting in a scramble to get those wounded to hospitals across a rural part of Montana.

Eight of the train’s 10 cars derailed about 4 p.m. local time Saturday near Joplin, nearly 200 miles north of Helena, Mont., Amtrak said in a statement, adding that an estimated 141 passengers and 17 crew members were aboard at the time.

Liberty County Sheriff Nick Erickson estimated that as many as 30 people were injured. By Sunday, five remained hospitalized in Great Falls, “all of them stabilized,” said Sarah Robbin, disaster and emergency services coordinator for Liberty County.

There was no information Sunday on what led to the derailment and local authorities had not released the names of the three people killed. The National Transportation Safety Board is investigating the derailment and said it planned a briefing on Monday.

Amtrak chief executive Bill Flynn said Sunday that the company shares a “sense of urgency to understand why the accident happened” but that the passenger railroad will not comment on the crash itself until the investigation is complete.

“The NTSB will identify the cause or causes of this accident, and Amtrak commits to taking appropriate actions to prevent a similar accident in the future,” he said. “We have no words that can adequately express our sorrow for those who lost a loved one or who were hurt in this horrible event. They are in our thoughts and prayers.”

The derailment comes at a critical time for Amtrak, which is hoping for a massive boost in federal rail funding. A broad infrastructure bill in the House could allocate $66 billion for passenger and freight rail — money that could be crucial in expanding operations across large metropolitan areas. The funds would also help address Amtrak’s nationwide maintenance backlog and modernize the Northeast Corridor.

Earlier this year, Amtrak unveiled a 15-year, $75 billion expansion plan that includes 39 new routes, but that rests on its ability to secure billions of dollars both for the service and for costly improvements to an aging and inadequate rail infrastructure.

Saturday’s derailment occurred on the Empire Builder route, which connects Chicago and Seattle, and is regarded as a lifeline for many in the Upper Great Plains who live in rural areas not easily accessible by plane. Amtrak describes the route as a journey through the “rugged splendor of the American West,” crossing the North Dakota plains and Big Sky Country in Montana, passing Glacier National Park on its way to Seattle or Portland, Ore.

The train was traveling on a track operated by BNSF Railway, which runs one of the largest freight railroad networks in North America, with 32,500 miles of rail across the western two-thirds of the United States, according to the railroad’s website.

Lena Kent, a spokeswoman for BNSF Railway, did not say whether any track work had recently occurred in the area, but said the railway was “working closely with Amtrak and local authorities.” The company said Sunday it had performed a routine inspection on that section of track two days earlier.

While Amtrak owns most of the track in its busiest rail corridor — from Washington to Boston — its trains outside the Northeast run on tracks owned by private railroads.

The Federal Railroad Administration said Sunday afternoon that the agency sent a team of 18 people to the scene, including technical experts on track, equipment, signal and train control, and train operations. Amtrak also said it was sending emergency personnel to the scene to support the NTSB investigation.

In the aftermath of the derailment, community members came to the aid of injured and stranded passengers. Photos and videos from the scene posted on social media showed train cars tipped on their sides, with people extending ladders and standing on top. Emergency crews could be seen as people gathered near the tracks with luggage.

“We are so fortunate to live where we do, where neighbors help neighbors,” Robbin said. “It’s amazing, the turnout, just the community in general helping everyone — there were even citizens that helped get people out, get them where they needed to go.”

Gov. Greg Gianforte (R) visited the crash site with emergency officials Sunday, saying rescuers had to cut through one of the train cars to get passengers out to safety. He said community members brought food and supplies, as well as provided airport trips to strangers so family members could be reunited with loved ones.

“In the face of this tragedy, Montana did what it does best,” he said. “Neighbors were helping neighbors.”

People who weren’t sent to hospitals were driven on a bus to a gym at a school in nearby Chester, said Katie Swank of the Liberty County Sheriff’s Office.

Rachel Ghekiere, a council member from Chester, was one of several people helping 50 to 60 passengers who were brought to the school, according to the Associated Press.

“I went to the school and assisted with water, food, wiping dirt off faces,” she told the AP. “They appeared to be tired, shaken but happy that they were where they were. Some looked more disheveled than others, depending on where they were on the train.”

Flynn said Amtrak will retrieve luggage left aboard the train when it gets permission to access the site.

The NTSB team of investigators is based in Great Falls, about 100 miles south of Joplin, underlining the challenges that the remote setting is posing for officials managing the probe.

Russ Quimby, a retired 22-year NTSB investigator, said there could have been numerous reasons for the derailment, including equipment failure, a broken wheel or something in the track, although he noted each was “extremely rare.” He said another possible cause is a track buckle — which can result after years of extreme temperatures swings — adding that the location of the incident made him believe this was a possibility.

He said investigators also will look for a video recording system on the train that captured anything that could have contributed to the accident. Investigators will interview crew members, Quimby said, and may look to see if there was maintenance in the area that could have affected the track.

Amtrak reported a number of service disruptions between stations in the Pacific Northwest and the Midwest as a result of the derailment.

The Joplin wreck occurred less than four years after an Amtrak derailment in Washington state, where the lack of an automatic braking system allowed the engineer to enter a 30-mph curve too quickly. That crash killed three passengers and injured 65.

In December 2020, the Federal Railroad Administration announced that positive train control safeguards were in operation on nearly 57,500 required miles of the nation’s railroads, two days ahead of a federal deadline.

That system is designed to take human error out of operating a train, automatically applying the brakes if a train is exceeding set speed limits. It can also prevent a train from going down the wrong track if a switch is left in the wrong position and help avoid collisions.

Federal officials have called the system the biggest safety advancement in railroads since the use of signals. It is unclear whether that system would have prevented Saturday’s derailment or whether it was in operation along the tracks in question.

Trains are considered one of the safest modes of transportation in the United States. Roadway deaths make up about 95 percent of all transportation-related fatalities in the United States and are about 17 times as high as rail-related deaths, according to an analysis from the National Safety Council. Most rail-related deaths involved trespassers at rail crossings.

Nonetheless, high-profile derailments do happen. In 2018, an Amtrak train carrying about 450 passengers, including a group of Republican lawmakers on their way to West Virginia, derailed after hitting a disposal truck, killing one and injuring six. And in 2017, an Amtrak train derailed on its inaugural trip from Seattle to Portland while crossing an overpass, killing three people and injuring 100 as it fell onto a highway below.