SAN FRANCISCO (AP) — A law enforcement official says the weapon used in the shooting death of a woman on a San Francisco pier belonged to a federal agent — the latest twist in a case that has become a flashpoint in the country’s debate over immigration.

The official, who had been briefed on the matter, said Tuesday that a check of the gun’s serial number shows it belonged to a federal agent.

The official — who was not authorized to speak publicly about the case and spoke on condition of anonymity — declined to elaborate.

The San Francisco Police Department, which is investigating the case, refused to comment on the disclosure.

The suspected gunman, Juan Francisco Lopez Sanchez, has been deported to his native Mexico five times and is suspected of living in the United States illegally when Kathryn Steinle, 32, was gunned down last week while on an evening stroll with her father along San Francisco’s popular waterfront area.

Federal officials transferred Sanchez to San Francisco’s jail in March to face a 20-year-old marijuana charge after Sanchez completed his latest prison term for illegally entering the country.

The San Francisco sheriff, citing the city’s “sanctuary city” policy, released Sanchez in April after prosecutors dropped the drug charge, despite an Immigration and Customs Enforcement request to hold him for federal authorities so deportation proceedings could begin.

Sanchez pleaded not guilty Tuesday to first-degree murder.

He told two television stations who interviewed him in jail that he found the gun used in Steinle’s killing wrapped in a shirt on the pedestrian pier she was walking on. Sanchez said the gun went off in his hands, and his public defender, Matt Gonzalez, said Tuesday that the San Francisco woman’s death appeared accidental.

Regardless of the reason behind Steinle’s death, the shooting has touched off criticism from leading Republican lawmakers — and from top Democrats, including both of California’s U.S. senators.

Democratic presidential candidate Hillary Clinton told CNN that San Francisco was wrong to ignore the ICE detainer request and release Sanchez from custody.

“The city made a mistake, not to deport someone that the federal government strongly felt should be deported,” Clinton said.

Sen. Dianne Feinstein called on San Francisco Mayor Ed Lee to start cooperating with federal immigration officials who want to deport felons such as Sanchez.

“I strongly believe that an undocumented individual, convicted of multiple felonies and with a detainer request from ICE, should not have been released,” Feinstein said.

The mayor’s office said it has reached out to Homeland Security officials to determine if there’s a way to cooperate while still upholding the city’s sanctuary policy.

“Mayor Lee shares the senator’s concerns surrounding the nature of Mr. Sanchez’s transfer to San Francisco and release,” said Christine Falvey, a spokeswoman for the mayor.

Democratic Sen. Barbara Boxer, also from Northern California, said she asked Gov. Jerry Brown if state law was followed in Sanchez’s release.

“For decades, I have supported deporting violent criminals, and I have always believed that sanctuary should not be given to felons,” Boxer said.

San Francisco Sheriff Ross Mirkarimi has defended Sanchez’s release and the city law requiring it to ignore ICE detainer requests. The sheriff said ICE could have obtained a warrant or court order to keep Sanchez in custody.

“ICE knew where he was,” Mirkarimi said Monday.

State and federal Republicans, meanwhile, said they would look into the matter.

Wisconsin Sen. Ron Johnson, who chairs the Senate’s homeland security committee, criticized federal officials and demanded to know why Sanchez was not deported.

“Does that make any sense to you?” Johnson demanded to know at a hearing Tuesday. “Because I’ll tell you it doesn’t make any sense to the American public.”

Republican state Sen. Jeff Stone said he would introduce legislation in Sacramento to require cities to comply with ICE detainer requests.

At Sanchez’s arraignment Tuesday, prosecutor Dianna Garcia argued against releasing Sanchez on bail, saying, “This was an act of random violence, shooting an innocent victim in the back.”

The judge set bail at $5 million, which Gonzalez said will keep Sanchez jailed pending trial.

___

Associated Press writers Amy Taxin in Los Angeles, Janie Har in San Francisco and Erica Werner in Washington contributed to this report.