Brandon Bostian, the Amtrak engineer charged in a Philadelphia derailment that killed eight in 2015, arrives for a preliminary hearing at the Criminal Justice Center in Philadelphia on Sept. 12. A judge dismissed the charges. (Matt Rourke/AP)

A Philadelphia judge has thrown out criminal charges against the engineer of an Amtrak train that was traveling twice the posted speed limit when it jumped the tracks, killing eight passengers two years ago.

Brandon Bostian was charged with involuntary manslaughter and reckless endangerment in a private criminal complaint brought by a state prosecutor after the local district attorney declined to press charges.

But Judge Thomas Gehret on Tuesday dismissed the charges, saying there was insufficient evidence to support them.

“Based on this evidence, I feel it’s more likely an accident than criminal negligence,” Gehret said.

The May 12, 2015, crash left rail cars strewn like toppled bowling pins beside the Frankford Junction tracks. One car ripped open in a contortion of aluminum that looked like a rail car. Others, whipped off the tracks at 103 mph, landed on their sides. Passengers hit the ceiling, flew out of broken windows, landed atop one another, were struck by flying luggage or were crushed in the twisted wreckage.

In addition to the eight dead, 46 people were seriously injured and 113 others suffered lesser injuries.

The train was northbound from Washington’s Union Station, had stopped at Philadelphia’s 30th Street Station and was bound for New York.

Federal investigators said there was no evidence of drinking, drug use or cellphone use, concluding that Bostian simply lost his bearings that night.

The National Transportation Safety Board said that Bostian opened the throttle because he believed his train already was past the sweeping curve where the derailment occurred.

The board determined that Bostian’s confusion was “likely because his attention was diverted to an emergency situation with another train.”

Bostian has told investigators that he remembers very little about the seconds just before the train roared into a 50-mph curve at 106 mph. He suffered a head injury in the wreck.

“I wasn’t, you know, super concerned, I don’t think,” Bostian told investigators two years ago in the first of two long interviews. “There’s been so many times that I’ve had reports of rocks that I haven’t seen anything, that I felt it was unlikely that it would impact me.”

The charges were brought in May after Pennsylvania Attorney General Josh Shapiro acted on a private criminal complaint lodged by a lawyer for Rachel Jacobs, 39, who died in the wreck. Shapiro acted as the statute of limitations was about to expire.

Philadelphia District Attorney Seth Williams already had said he would not press charges because he found no evidence of criminal intent or responsibility.

Amtrak accepted responsibility for the wreck, agreeing to pay $265 million to resolve claims filed by victims and their families.

At Tuesday’s hearing before Judge Gehret, one of the train’s passengers testified that the train was “going way too fast” around the curve, and then she heard a “big bang.”

“I heard screaming from the front of the car and then a big bang and then I blacked out and woke up in the woods,” said Blair Berman, who suffered from several broken bones.

Philadelphia Police Det. Joseph Knoll testified that Bostian didn’t know where he was when he arrived at a hospital.

Knoll said Bostian asked nurses “Are we in New York?”