Brandon Bostian, the engineer operating an Amtrak train that derailed in 2015, was taken into custody on charges related to the deaths of eight people on board the train.

Bostian, wearing a maroon polo shirt and jeans, was cuffed by investigators from the Pennsylvania Attorney General's Office at the corner of 21st and Hamilton Streets about 10:15 a.m. Thursday and and escorted into the Philadelphia Police Department's 9th District station.

Bostian was accompanied by his lawyer Robert Goggin and said nothing to the scrum of reporters who descended on him at the intersection.

Bostian was arraigned Thursday night and ordered released on $81,000 "sign-on bond," meaning he did not have to pay anything as long as he appears for his court dates — the next being June 7. If he failed to appear, a bench warrant would be issued for his arrest and he would be required to pay the full amount. He appeared calm and responded to questions from Magistrate Kevin Devlin, but made no statements.

After the arraignment, Goggin said the charges were rushed by the Pennsylvania Attorney General's Office without a proper review of the "mountains of evidence" compiled by crash investigators.

Goggin said the Department of Justice and the Philadelphia District Attorney's Office had reviewed the totality of evidence and had concluded that charges were not warranted.

He said he was "hopeful" that state prosecutors, after having reviewed the evidence, would withdraw the charges. His client, Goggin said, would be returning to Massachusetts as soon as possible.

On Friday afternoon, Attorney General Josh Shapiro charged the 34-year-old engineer with eight counts of involuntary manslaughter, one count for each of those who died in the crash; causing a catastrophe; and numerous counts of reckless endangerment. The charges were filed just before the two-year statute of limitations expired for the reckless-endangerment charges.

"We will make our case in court; I think we have a strong case to make," Shapiro said on Monday in Harrisburg. "But I think what's important here is that we thought it was vitally important that someone spoke up for the victims and tried to bring about justice for the victims. And that's exactly what we did with the array of charges that we issued."

The complaint, filed initially with the Philadelphia District Attorney's Office, stated Bostian knew the route well, was aware of the more than 240 people on board the train, and was well familiar with speed limits on the route as he accelerated into a curve that caused the derailment. He had to have known the dangers his actions posed, according to the complaint.

On May 12, 2015, Bostian drove a seven-car train off the tracks at Frankford Curve, killing eight and injuring more than 150 people. Bostian accelerated Amtrak Train 188 to 106 mph, more than twice the speed posted, as it approached Frankford Curve north of 30th Street Station, according to findings by the National Transportation Safety Board.

The federal investigation concluded he had no alcohol or drugs in his system, and was not using his cellphone at the time of the derailment. Bostian told the NTSB he did not remember what had happened. The federal agency's review concluded that he lost "situational awareness," probably because of radio chatter about a rock hitting a SEPTA train near Frankford Curve, shortly before the derailment.

On May 9, the Philadelphia District Attorney's Office declined to prosecute Bostian, saying there was not enough evidence to support a reckless-endangerment charge. But civil attorneys representing victims of the derailment pursued another route to charges. A criminal complaint was brought Wednesday by the father and husband of Rachel Jacobs, a young mother who died in the derailment.

The District Attorney's Office rejected that complaint early Thursday, and Jacobs' family went to court to obtain an order requiring the office to charge Bostian. After an order was issued, the District Attorney's Office recused itself because it had already declined to press charges and the state Attorney General's Office stepped in.

Staff writers Robert Moran and Angela Couloumbis contributed to this article.