On a sweltering July afternoon, Houston police officer Jesus Robles slowed his squad car as he passed a pushcart vendor hawking popsicles called paletas in a park named after the father of Mexican independence.

“This is the heart of Magnolia,” he explained, using an affectionate term for the longtime immigrant community served by the Houston Police Department’s Eastside Division. “These are humble people who don’t ask for much other than to be left alone to work and take care of their families.”

Robles himself is a Mexican immigrant whose mother swam across the Rio Grande with him in her arms. She was granted amnesty under Ronald Reagan, allowing Robles to eventually gain citizenship two decades later. Now he says undocumented residents who used to seek his help are alarmed by a Texas law that will let police check the immigration status of anyone they detain.

“These are the people who would become afraid to call us or be witnesses to crimes,” Robles said, gesturing toward the vendor, adding that even legal immigrants avoid contact with police in order to protect undocumented family members or friends.

Set to take effect September 1, Senate Bill 4 bans local law enforcement agencies from adopting “patterns or practices” that limit cooperation with U.S. Immigration and Customs Enforcement. Sheriffs, police chiefs, and jail administrators face Class A misdemeanor charges and fines up to $25,500 if they violate the law by instructing officers not to inquire about immigration status or comply with so-called detainer requests to transfer jailed immigrants to ICE custody.

The measure grew out of a standoff between Travis County Sheriff Sally Hernandez and Texas Gov. Greg Abbott. After Hernandez refused to honor detainer requests for jail inmates unless they were charged with a serious crime like murder or sexual assault, Abbott vowed to pass a law that would let him fire her for failure to comply. When he signed the bill on Facebook Live in May, he made a point of calling her actions “sanctuary city policies” that “won’t be tolerated in Texas.”

Just before voting on SB4, hardline conservatives amended its “show me your papers” provision to let police inquire not just about the immigration status of anyone they arrest, but also those they simply detain — such as someone who is being questioned after reporting suspected criminal activity.

During an emotional debate on the amendment, Democratic Rep. Mary González described her experience as a survivor of sexual assault and said that “women and children who are survivors of sexual assault, rape, human traffickers” are “the people who will feel the disconnect from law enforcement — the people who are supposed to make them safe.”

In April, Houston Police Chief Art Acevedo announced that before SB4 had even passed, HPD saw a nearly 43 percent decrease in the number of Hispanic victims reporting rape, even as rapes reported by non-Hispanics increased by 8 percent.

SB4 author Sen. Charles Perry insists that “predictability that our laws are applied without prejudice” throughout Texas will enhance public safety by creating a one-size-fits-all approach for immigration enforcement by local officers. But Acevedo notes that “if someone victimizes a Hispanic person and gets away with it, the next victim may be a person with blond hair and blue eyes, a natural-born citizen.”

Acevedo argues that the perception of police as ICE collaborators is also reversing decades of work to build trust with communities of color. “If you think about the civil rights movement back in the ’50s and ’60s, it was American police officers, quite frankly, and the policing profession that helped try to fight, ward off desegregation,” Acevedo told The Intercept. “We’ve had a history that is not the prettiest.”

Civil rights advocates filed a suit to block SB4 immediately after it passed, based in part on the argument that it violates policies that prohibit racial profiling. Texas’s four largest cities have since joined the case against the bill, along with two counties that straddle the state’s border with Mexico.

Before opening arguments last month, U.S. District Judge Orlando Garcia allowed El Paso County attorney Jo Anne Bernal to testify about her concern that the law violates the settlement of a case in which a sheriff’s deputy stopped a public bus and asked passengers for their citizenship papers. As part of the settlement, the county agreed to prohibit deputies from enforcing immigration law.

In San Antonio, where Hispanics account for nearly two-thirds of residents, officers are barred from initiating a law enforcement action on the basis of race, national origin, or citizenship, “except to determine whether a person matches a specific description of a particular suspect.”

The Houston Police Department has prohibited officers from asking about a person’s citizenship status since 1992, unless there is an investigative need, which can arise in cases of suspected human smuggling or trafficking. But an HPD fact sheet notes police can still jail an immigrant stopped for a routine traffic violation if “the officer’s computer check verifies that you have a deportation warrant or a notice that you are a previously deported felon.”

Acevedo told The Intercept that he has “zero tolerance” for officers who target immigrants and under SB4 will require them to write a report that explains each time they make an inquiry into someone’s citizenship status. HPD’s most recent racial profiling analysis, released in early 2016, concluded there was “no evidence that officers of the Houston Police Department engage in racial profiling” and noted there were “no allegations brought by members of the public.”

Despite the outcry over SB4 from Texas law enforcement leaders, most already work closely with ICE. Harris County, which includes Houston, was among the first to join the Secure Communities program in 2008, sharing biometric data of people booked into its jails with immigration agents, who can then request a detainer. Travis County, where Hernandez limited compliance with detainer requests to inmates charged with serious crimes, had the fifth highest number of jail inmates with ICE holds in Texas the month after Donald Trump became president.

Garcia is expected to decide in early August whether to grant a preliminary injunction to stop SB4 from taking effect. Unlike in Arizona, where the Obama administration’s Department of Justice joined civil rights advocates in challenging a similar “show me your papers” measure known as SB 1070, the Trump administration has filed a statement of interest arguing SB4 is constitutional, and sent two lawyers to support Texas during the hearing in June.

In the meantime, immigrant rights advocates have called for police to de-prioritize petty offenses that can bring immigrants into contact with law enforcement, and to use their discretion not to arrest those who drive without a license since such stops can now be a pathway to deportation.

Robles says that while he plans to use such discretion, he tells undocumented immigrants who seek his advice that “there is a law out there that may affect them. If they cross the wrong person who has the idea that doing immigration work is what policing is all about, I can’t say it’s not going to affect you. I would be lying.”