A Philadelphia judge has dismissed ­criminal charges against Brandon Bostian, the engineer operating the Amtrak train that derailed and killed eight people, injuring dozens more in the Port Richmond section of the city in 2015.

Judge Thomas Gehret dismissed the charges against Bostian at a hearing Tuesday, ruling that there wasn’t enough evidence to show a crime had been ­committed, the state Attorney General’s Office confirmed.