In a decision certain to reignite debate over one of the most consequential events in recent city history, a Philadelphia judge on Tuesday reinstated all criminal charges against the engineer in the fatal 2015 Amtrak derailment.

The decision by Common Pleas Court Judge Kathryn Streeter Lewis once again clears the way for the case against Brandon Bostian to be put before a jury. Bostian's prosecution has for years taken unusual twists and turns through the criminal justice system, even as millions of dollars have been awarded to victims who filed civil suits against Amtrak.

Bostian, 34, sat quietly next to his attorneys in court as Lewis announced her ruling. The charges against him had been in limbo since September, when a Municipal Court judge tossed them out and said the evidence suggested the derailment was an accident — not criminal.

But the state Attorney General's Office appealed that decision, and Lewis — without offering further explanation — agreed Tuesday that the dismissal of those charges was wrong. Her ruling, delivered during a brief hearing at the Criminal Justice Center, instantly revived more than 200 counts of reckless endangerment, eight counts of involuntary manslaughter, and one count of causing a catastrophe.

Bostian will remain free on bail. He and his attorneys, Brian McMonagle and Robert Goggin, declined to comment after the hearing Tuesday.

The question of whether Bostian should be prosecuted has long taken an unusual path. The engineer had been conducting Amtrak Northeast Regional Train No. 188 on May 12, 2015, as it carried more than 250 passengers and hit the Frankford Curve in Port Richmond while traveling 106 m.p.h. — more than double the speed limit. Eight people died in the derailment and more than 150 were injured.

The National Transportation Safety Board, in reviewing the incident, wrote in reports that Bostian did not have drugs or alcohol in his system and may have been disoriented by reports of rocks being thrown at a nearby SEPTA train.

Last year the District Attorney's Office announced that it had reviewed the evidence and decided against charging Bostian.

But shortly after that announcement, lawyers for one of the deceased passengers, Rachel Jacobs, filed a private criminal complaint against Bostian and a judge eventually sided with them — ordering the District Attorney's Office to prosecute the case.

The office subsequently recused itself, handing prosecution over to the state Attorney General's Office. Attorney General Josh Shapiro then announced a full slate of charges against Bostian — including the involuntary manslaughter counts.

All those charges were dismissed last fall by Philadelphia Municipal Court Judge Thomas Gehret. After overseeing Bostian's preliminary hearing, Gehret said: "Based on that evidence, I think it's more likely than not this was an accident and not criminal."

McMonagle, Bostian's attorney, said at the time that the derailment was "a horrible tragedy, but the law recognizes there's a big difference between an accident and a crime."

Lewis, the Common Pleas judge who ruled on the appeal, did not decide Tuesday whether Bostian was guilty of any crime. But she said the Attorney General's Office had presented sufficient evidence for prosecutors to present their case at trial.

Christopher Phillips, of the Attorney General's Office, said prosecutors were "pleased with the court's ruling."

Thomas R. Kline, a lawyer who represented a number of victims in civil suits against Amtrak, said Bostian should face a jury for what he called "unquestionably and undoubtedly reckless conduct."

"There needs to be, at the end of the day, a reckoning for these families," Kline said.

Bostian is scheduled to be arraigned in February. A potential trial date has not been set.