The competency of a defendant in a 2015 homicide case that figured prominently in Donald Trump’s run for president is being reviewed by a federal judge, according to a report.

Illegal immigrant Jose Ines Garcia Zarate of Mexico is facing federal gun charges in the shooting death of Kate Steinle, 32, who authorities say was struck by gunfire when she visited a crowded pier in San Francisco.

In part because Zarate was a convicted felon and had previously been deported from the U.S. five times, the case sparked a national debate about so-called “sanctuary cities” such as San Francisco, and other aspects of U.S. immigration policies.

Defense attorneys for Zarate have claimed he found the gun and fired it accidentally. He stood trial in 2017 on charges that included murder but a San Francisco Superior Court jury acquitted him of all charges except being a felon in possession of a firearm, The Associated Press reported.

BRANDON JUDD: TRUMP IS STRENGTHENING BORDER SECURITY, KEEPING VIOLENT CRIMINALS AND ILLEGAL DRUGS OUT OF US

That conviction, however, was later overturned by an appeals court, the report said.

When the initial verdict was announced, Trump – who was nearing the end of his first year as president – called the jury’s decision “disgraceful.”

San Francisco shooting suspect Jose Ines Garcia Zarate and victim Kathryn Steinle are shown in this composite photo. (Associated Press)

“No wonder the people of our Country are so angry with illegal immigration,” the president wrote at the time.

Zarate has been in custody since July 1, 2015, the day of the shooting, and has been awaiting a new trial on the weapons charge. But the case is pending because in January, U.S. District Court Judge Vince Chhabria expressed “serious concerns” about the defendant’s mental status, the AP reported.

Two doctors have diagnosed Zarate as being schizophrenic and declared him unfit to stand trial, claiming he is unable to follow court proceedings.

Zarate reportedly wanted to plead guilty at a hearing Friday but the judge would not allow it, according to the AP.

CLICK HERE TO GET THE FOX NEWS APP

In January, a California judge threw out a lawsuit brought by Steinle’s parents, who had argued the federal government was liable for their daughter’s death because the gun had been reported stolen from a car used by a ranger from the U.S. Bureau of Land Management.

“Aside from the fact that the stolen gun was used, there is no evidence that the shooting was in any way connected to the theft,” U.S. Chief Magistrate Judge Joseph C. Spero wrote in his 14-page ruling.

The Friday hearing was expected to include some closed-door testimony by Zarate before Chhabria, the San Francisco Examiner reported – though the reason for that portion was not clear.

The Associated Press contributed to this story.