A judge expressed skepticism Tuesday of a Mexican national's claim that he's the target of a vindictive federal prosecution after a San Francisco jury acquitted him of murder in a case at the center of a heated national debate over immigration.

Jose Inez Garcia-Zarate and his lawyer contend federal prosecutors were politically motivated when they charged him with felony gun possession five days after he was acquitted on state charges of murder in the 2015 shooting of Kate Steinle on a San Francisco pier.

Garcia-Zarate said a gun he found on the pier accidentally fired when he picked it up. He had previously been convicted three times of illegal re-entry into the United States.

"You have an uphill battle," U.S. District Judge Vince Chhabria told his lawyers.

Garcia-Zarate, who has pleaded not guilty to the federal gun charges, had been released from San Francisco's jail weeks before the fatal shooting, despite a federal immigration request to detain him for deportation. San Francisco's so-called sanctuary city policy bars local cooperation with federal deportation efforts.

Garcia-Zarate has been arrested several times in Texas and in the western United States and his lawyers said he is often homeless. He has used several aliases and the latest federal charges list four other names Garcia-Zarate has given to law enforcement authorities. The federal docket in San Francisco shows him using the name Jose Inez Garcia-Zarate. State court officials spelled that name Jose Ines Garcia-Zarate, the spelling The Associated Press and other media used during the murder trial.

President Donald Trump repeatedly referred to the shooting during his campaign to bolster his argument for tougher immigration policies and his opposition to sanctuary cities.

Trump called the verdict in a Tweet "disgraceful" and U.S. Attorney General Jeff Sessions blamed San Francisco's sanctuary city policy for Steinle's death.

Garcia-Zarate's attorney Tony Serra said those comments and other dissatisfaction with the verdict publicly expressed by administration officials suggest that the federal prosecution is politically motivated. Serra wants the judge to review all communications between the White House, U.S. Department of Justice and other administration officials regarding the case.

Serra said it's "obvious" that the president has a political interest in the case. "He needed to put this guy away to fulfil his campaign promises," Serra said.

But the judge was skeptical.

"Even if there was communication, how does that form the basis for vindictive prosecution?" he asked. The judge said the gun charge appears to be a routine case for federal prosecutors. He speculated that federal prosecutors allowed the San Francisco district attorney to initially handle the case so that Garcia-Zarate could be charged with murder.

"If this were a straight felon-in-possession case, federal prosecutors probably would have brought charges," Chhabria said.

Chhabria said he would issue a written decision at a later date. Garcia-Zarate remains in jail pending an Oct. 1 trial.