The murder of a young woman in San Francisco allegedly at the hands of an illegal immigrant has brought renewed scrutiny on the sheriff who released the defendant before the attack and has ardently backed policies making the city a “sanctuary” for undocumented immigrants.

Immigration and Customs Enforcement officials in March handed over defendant Francisco Sanchez on a drug-related warrant to the San Francisco Sheriff’s Department.

However, the department released him several weeks later, after the charges were dropped, following a policy of not complying with federal requests to detain illegal immigrants for deportation.

"My long-held belief is that local law enforcement should not be in the civil immigration detainer business," San Francisco Sheriff Ross Mirkarimi said last year, after the policy was adopted.

Mirkarimi, a Democrat and former Green Party member, has argued since Sanchez allegedly shot to death 32-year-old Kate Steinle on July 1 that federal authorities should have issued a warrant or court order to hold Sanchez, who has seven prior convictions and has already been deported five times.

But this claim has been met with skepticism, given the circumstances. “He should have honored the immigration hold,” immigration lawyer Francisco Hernandez told Fox News on Tuesday.

Mirkarimi, elected in 2011, is up for re-election in November. Now, Steinle’s death, coupled with personal and departmental missteps, pose potential problems.

In 2012, the sheriff was suspended from office after being charged with domestic violence battery, child endangerment and dissuading a witness in connection with an altercation with his wife.

He pleaded guilty to one misdemeanor count of false imprisonment and was reinstated about seven months later, after the San Francisco Board of Supervisors failed to get enough votes to remove him from office.

Still, Mirkarimi, a former board member, was sentenced to three years of probation and had to stay away from his wife for seven months.

A two-week-long, sheriff department-led search in 2013 to find a missing hospital patient also came under criticism, despite Mirkarimi’s apologies for the slow response. The female patient’s body was eventually found inside the hospital by an employee.

Mirkarimi, meanwhile, has actively defended so-called "sanctuary city" policies that San Francisco and dozens of other cities and counties across the country follow -- they essentially limit local authorities in assisting federal officials on immigration and deportation cases.

San Francisco sheriff's deputies who opposed the policies reportedly were secretly helping federal authorities get illegal immigrants off the streets, until March when Mirkarimi issued a directive stating only he could turn them over to ICE.

“Being able to say, ‘I’ll call ICE for this guy, but not call ICE for that guy or that woman or not that woman,’ that doesn’t make any sense,” Mirkarimi told a local CBS radio station on Monday, in defending his policy.

Mirkarimi has tried to push some of the blame on the feds in the aftermath of the killing on a popular city pier.

“If ICE does not provide the proper legal instrument, they are jeopardizing also the city’s ability to detain somebody against their will,” he said. “We need ICE to step up. … ICE knew that he had been deported five times.You would have thought [Sanchez] met a threshold that he required a court order or a warrant. They did not do that."

ICE, though, said it issues nearly 200,000 detainers a year and that getting a warrant for each one is impossible because the judicial system would collapse under that kind of volume.

As a board supervisor from 2005 to 2011, Mirkarimi also proposed legislation to make San Francisco the first city in the country to sell marijuana. And he introduced legislation that ultimately made the city the first in the country to prohibit large supermarkets and drug stores from providing customers with non-biodegradable plastic bags.

The Associated Press contributed to this report.