Newly confirmed Department of Homeland Security Secretary Kirstjen Nielsen praised Texas for its efforts to crack down on so-called sanctuary cities, saying she hopes other states follow this lead.

“I encourage cooperation between federal, state and local law enforcement in eliminating the shadowed society outside the rule of law,” she said during a press conference in Austin Tuesday.

Senate Bill 4, passed in the 2017 legislative session, allows police to ask people about their immigration status during routine traffic stops. It also threatens elected officials with removal from office if they don’t cooperate with federal immigration authorities. Right now, the law is undergoing a federal court challenge.

“So-called sanctuary cities openly defy the federal government, giving illegal aliens who have already committed crimes a pass to walk free and commit additional crimes in our communities,” Nielsen said.

In October, when US Attorney General Jeff Sessions visited Texas, he said the state had taken a “leadership role” on the issue. In response to Sessions’ visit, Travis County Sheriff Sally Hernandez, who has spoken out against the ban on sanctuary cities, said Sessions didn’t “know our community.”

“Our community is not safer [by implementing SB 4]. We’ve been going out to town hall meetings and meeting with our community – it’s clear that the direction we’re going right at the moment is not the best for our community,” Hernandez said that day after joining other law enforcement officials in a meeting with Sessions.

Nielsen said local law enforcement officials are often placed in danger under sanctuary city policies.

“Just because a criminal is released into the community, it does not mean they are no longer subject to removal,” Nielsen said. “It does not mean that ICE will stop looking for them. What it does mean is that the officer’s job just became much more dangerous and difficult.”

Groups that help the immigrant community, like American Gateways in Austin, said the federal government’s push against sanctuary cities breaks trust between local officials and the people they serve.

“If that immigrant doesn’t feel safe coming forward to the police and letting them know, I think all of us are harmed by that,” executive director Rebecca Lightsey said. “What we are seeing is some real trepidation among some of our clients in reporting some of the things that are happening.”

Texas Democratic Party Deputy Executive Director Manny Garcia said in a statement the Trump Administration’s immigration agenda “is nothing but an attack on communities of color and immigrant families.”

Nielsen also said seven counties in Texas have signed Delegation of Immigration Authority Section 287(g) agreements. She said allows state and local law enforcement officers to assist ICE agents in their jails.

“This creates safer communities by taking dangerous criminal aliens off the street instead of allowing them to be released from local jails and expedites the process in which they face their federal immigration crimes,” she said.

Nielsen also met with Gov. Greg Abbott to discuss ongoing Hurricane Harvey recovery efforts, border security and cyber security.