The U.S. Bureau of Land Management said Wednesday that it is investigating whether an agent's gun was used in the shooting death of a woman walking on a popular San Francisco pier.

BLM spokeswoman Dana Wilson said the agency is trying to determine who owned the gun and whether it was a personal or service weapon - the latest twist in a case that has become a flashpoint in the country's debate over immigration.

San Francisco Police Chief Greg Suhr says the weapon was stolen from a federal agent's car.

Juan Francisco Lopez Sanchez, who has been deported to his native Mexico five times and is suspected of living in the United States illegally, told television news stations that he found the gun on the pier and that it accidentally fired. He pleaded not guilty Tuesday to murder charges in Kathryn Steinle's death.

Steinle, 32, was gunned down last week while strolling 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 he completed his latest prison term for entering the country illegally.

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.

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.

The shooting has touched off criticism from leading Republican lawmakers and from top Democrats, including 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.

U.S. 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.

U.S. Sen. Barbara Boxer 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 his office 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.