The shooting death of a woman along the San Francisco waterfront has inflamed the already contentious national debate over illegal immigration, with the Obama administration accusing local officials of releasing the suspected shooter in defiance of efforts to deport him.

The latest clash over the nation’s 11.3 million illegal migrants began after the death Wednesday of Kathryn Steinle, 31, who was shot in the upper torso as she walked with her father at a popular tourist destination. San Francisco police swarmed the area and arrested a man an hour later, police said.

It turned out that the suspect, Juan Francisco Lopez-Sanchez, had seven felony convictions stretching back to 1991 and had been deported from the United States five times. San Francisco authorities released him from custody in April after drug charges against him were dropped, despite an urgent request from the Department of Homeland Security that he be deported a sixth time to his native Mexico, federal and local officials said.

In a strongly worded statement, U.S. Immigration and Customs Enforcement, which is part of DHS, said the San Francisco officials ignored ICE’s request for a heads-up before Lopez-Sanchez was let go. “As a result, an individual with a lengthy criminal history, who is now the suspect in a tragic murder case, was released onto the street rather than being turned over to ICE for deportation,’’ said Gillian Christensen, an ICE spokeswoman.

Local authorities have accused DHS of failing to respect San Francisco’s status as a “sanctuary city” for undocumented immigrants that limits their ability to cooperate. “We’re not seeking to turn over illegal immigrants to federal custody,’’ said one San Francisco law enforcement official, speaking on condition of anonymity because the case is unfolding.

Juan Francisco Lopez-Sanchez, as shown in an undated photo released by the San Francisco Police Department. (AP)

Lopez-Sanchez, 45, was expected to be formally charged late Monday in Steinle’s death, officials said. It is unclear if he has an attorney.

The unusual federal-state dispute highlights the charged nature of the immigration debate, which is emerging as a key issue in the 2016 presidential campaign. Republican candidate Donald Trump escalated the rhetoric last month, describing Mexicans entering the country illegally as “rapists” and “murderers.” Trump has since blasted San Francisco authorities for what he called their mishandling of the Lopez-Sanchez case.

Tensions have also been building in recent years between DHS and police over how to handle undocumented immigrants taken into custody, with about 300 communities nationwide ending or scaling back their participation in DHS’s Secure Communities program. It allowed ICE to ask police departments that had arrested someone ICE wanted to deport to hold the immigrants beyond their scheduled release so federal agents could pick them up.

DHS secretary Jeh Johnson ended Secure Communities in November, replacing it with a new Priority Enforcement Program. Under this plan, ICE will ask to be notified before the scheduled release of an immigrant targeted for deportation.

Though that program won’t take effect until later this summer, ICE was following the new guidelines when it sought in March to be notified prior to Lopez-Sanchez’s release. He had been turned over to San Francisco authorities that month on a local arrest warrant for a drug charge, after he finished serving a federal sentence for illegally re-entering the country.

Sanctuary laws are in the national spotlight after an illegal immigrant with prior deportations and a criminal history pleaded not guilty to murdering a woman at a San Francisco pier. Here is what you need to know about what those laws and how they protect illegal immigrants. (Jayne W. Orenstein and Osman Malik/The Washington Post)

But the drug charge, involving a 20-year-old marijuana case, was dropped, and ICE was not told when Lopez-Sanchez was released April 15. “That’s what’s so mind-boggling about this case,’’ said one federal official, speaking on condition of anonymity because of the issue’s sensitivity. “It seems that anyone with a modicum of good sense would have said this is not a guy who should be put back on the street.’’