SAN FRANCISCO (AP) — A Mexican man who was acquitted of killing a woman on a San Francisco pier in a case that became a national flashpoint was found incompetent to stand trial Friday on federal gun charges.

U.S. District Court Judge Vince Chhabria said in a court order that a psychiatric evaluator had concluded Jose Inez Garcia-Zarate was not competent to stand trial “because of mental illness that is not presently being treated."

Chhabria said he would meet with lawyers from both sides next week to discuss the next steps. If either side objects to the findings, a hearing would likely be required to examine Garcia-Zarate's competency. If neither side disputes the findings, the court will discuss whether the defendant should be treated locally for mental illness or sent to a federal facility outside California.

Defense attorney Tony Serra said he would contest the finding.

“He is entitled to a hearing," Serra said. “I'm protesting that he is competent enough for this case."

Friday's decision is the latest delay to a case that touched off a national debate over immigration and sanctuary city policies.

Garcia-Zarate was due to stand trial in January for two counts of illegal gun possession. But Chhabria postponed the trial for an evaluation amid concerns about his “apparent mental illness.”

President Donald Trump and others in his administration have repeatedly pointed to the case as a reason for toughening the country's immigration policies. Garcia-Zarate was living in the country illegally and had been deported five times before the shooting.

Jurors in California court found him not guilty of killing Kate Steinle in 2015. But they convicted him of being a felon in possession of a gun, leading to a three-year jail sentence.

A state appeals court threw out the conviction last August, finding that jurors received improper instructions from the trial judge. Federal prosecutors then charged him with gun possession in 2017.

Garcia-Zarate acknowledged holding the gun that killed Steinle. But he said it fired accidentally when he found it wrapped in a T-shirt under a bench on the pier, where Steinle was walking with her father. The weapon belonged to a U.S. Bureau of Land Management ranger who reported it stolen from his parked car.

The case fueled criticism of San Francisco's sanctuary city policy, which limits local officials from cooperating with federal immigration authorities on deportations.

The San Francisco sheriff's department released Garcia-Zarate from jail several weeks before the shooting despite a federal request to detain him until immigration authorities could take him into custody.