SAN FRANCISCO – Homeland Security Secretary Jeh Johnson on Tuesday criticized policies such as the one in San Francisco against generally cooperating with immigration officials, calling the stances counterproductive and unacceptable.

The city's sanctuary policy has come under scrutiny since the shooting in July of Kate Steinle as she walked with her father and a family friend along the San Francisco waterfront.

The shooting triggered a national debate over immigration after it was revealed the man charged in the killing, Juan Francisco Lopez-Sanchez, had been deported five times to his native Mexico and was out on the streets after San Francisco officials disregarded a request from immigrations authorities to keep him locked up.

Asked whether federal officials could have done more to prevent the release of Lopez-Sanchez, Johnson said the city's sheriff had failed to honor a request to detain him. He said he wants to do away with immigration detention requests, which have been resisted by some local communities, in favor of a notification system that prioritizes immigrants convicted of certain crimes.

"It is counterproductive to public safety to have this level of resistance to working with our immigration enforcement personnel," he said during a talk at The Commonwealth Club in downtown San Francisco.

He added, "It is simply in my judgment not acceptable to have no policy of cooperation with immigration enforcement. We're all interested in getting criminals off the streets."

San Francisco's sanctuary law prohibits city employees from helping federal authorities with immigration investigations or arrests unless required by law or a warrant. It does not prohibit local law enforcement from informing U.S. Immigration and Customs Enforcement that they've arrested someone in the country illegally for a felony offense or detained a person with prior felony convictions.

San Francisco Sheriff Ross Mirkarimi has defended the law as a way to fight crime and promote trust in immigrant communities.

He said after Steinle's slaying that his office routinely ignores such federal immigration requests unless backed by an active warrant, and immigration officials were aware of the city's policy.

Johnson was also asked whether he had visited the pier where Steinle was shot. He said he hadn't but perhaps should to pay his respects.

A judge ruled earlier this month that Lopez-Sanchez must stand trial on a murder charge in Steinle's shooting. Lopez-Sanchez acknowledged shooting Steinle but said the gun he found under a bench fired accidentally.