CIUDAD JUAREZ, Mexico — A judge on Saturday ordered the immigration director of Mexico's northern border state of Chihuahua to stand trial Saturday on charges of homicide, injuries and failure to perform his duties, for last month's deadly fire at a migrant detention center.

The judge ordered the director, Salvador González, to be held in prison pending trial.

Judge Juan José Chávez said there was evidence that González failed to do his duty to protect the migrants. Forty migrants died in the March 27 fire in the border city of Ciudad Juarez, after a migrant allegedly set fire to foam mattresses to protest a supposed transfer.

“In the end, everything depends on the head" official, Chávez said. “Not complying with standards does have its results."

Five other officials of the country’s National Immigration Institute, a guard at the center and the Venezuelan migrant accused of starting the blaze are already in custody facing homicide charges.

The step is significant, in part because González is a retired Mexican navy rear admiral. He is the highest ranking official to be held over for trial in the case, though prosecutors have said they will press charges against the immigration agency’s top national official, Francisco Garduño, who is scheduled to make a court appearance April 21.

Federal prosecutors have said Garduño was remiss in not preventing the disaster in Ciudad Juarez despite earlier indications of problems at his agency’s detention centers. Prosecutors said government audits had found “a pattern of irresponsibility and repeated omissions” in the immigration institute.

The fire in Ciudad Juarez, across the border from El Paso, Texas, quickly filled the facility with smoke. No one let the migrants out.