The criminal case against an illegal immigrant accused of fatally shooting a woman on a San Francisco pier took a new turn Wednesday, as reports emerged suggesting that the gun used to fire the deadly shot may have been stolen from a federal law enforcement agent four days earlier.

The federal Bureau of Land Management said Wednesday that a weapon belonging to one of its law enforcement officers was stolen on June 27 in San Francisco, but the agency would not confirm that the weapon was used in the apparently random shooting that occurred July 1, resulting in the death of woman out for a walk with her father.

A law enforcement official said separately that the gun in that case belonged to a federal law enforcement agent.

The man charged with the shooting, 45-year-old Juan Francisco Lopez-Sanchez, said in interviews with local media that he found the gun wrapped in a T-shirt.

The case has ignited a national debate about the merits of San Francisco’s “sanctuary” policy, in which law enforcement officers routinely do not cooperate with federal immigration enforcement actions. Lopez-Sanchez, an illegal immigrant, had a long history of felony convictions and had been deported to Mexico five times.

The weapon used to kill 32-year-old Kate Steinle was a .40 caliber pistol, according to a law enforcement official who was not authorized to speak publicly about the case. A single bullet had been fired from the gun.

Dana Wilson, a spokeswoman with BLM, said the agent was en route to an official travel assignment when the agency-issued weapon was stolen from his vehicle. The theft was reported to the San Francisco Police Department.

San Francisco is a “sanctuary city” that generally does not voluntarily cooperate or communicate with immigration officials on matters of enforcement.

Most recently, Lopez-Sanchez was in federal custody serving time for illegally entering the United States when he was released to the custody of San Francisco authorities in March on drug charges that were later dropped. Federal immigration officials blamed local authorities for ignoring a request to notify them before Lopez-Sanchez was released, which they said could have prevented Steinle’s death.

In jailhouse interviews with local stations, Lopez-Sanchez said he found the gun wrapped in a T-shirt on the pier and that it went off. He told local station KGO that he didn’t realize someone had been shot. Steinle was walking along Pier 14 with her father when she was struck by the bullet.

The San Francisco Chronicle reported that the gun was stolen from a federal agent in June.

Lopez-Sanchez pleaded not guilty to the charges in court Tuesday.

A public defender assigned as his attorney said his client has a second-grade education, according to the San Francisco Chronicle.

“This very well could be a completely accidental discharge of a firearm,” said attorney Matt Gonzalez. “You’ve got an individual who does not know the victim in the case, has no interest or desire in injuring her in any way, and no witness or anybody to allege that there was any crime going on at the time the shooting occurred.”

The case has drawn reactions from local and national figures alike. Tuesday, Democratic presidential candidate Hillary Rodham Clinton said San Francisco “made a mistake” in not cooperating with immigration authorities in the case.

“Well, what should be done is any city should listen to the Department of Homeland Security, which as I understand it, urged them to deport this man again after he got out of prison another time,” Clinton said. “The city made a mistake, not to deport someone that the federal government strongly felt should be deported.”

“So I have absolutely no support for a city that ignores the strong evidence that should be acted on,” she added.

San Francisco Mayor Ed Lee defended the city’s “sanctuary city” policies but called on federal officials to investigate what went wrong in this case.

“I am concerned about the circumstances that led to the release of Mr. Sanchez,” Lee said in a statement Monday. “All agencies involved, federal and local, need to conduct quick, thorough and objective reviews of their own departmental policies and the decisions they made in this case.”

[This post has been updated.]