For Latino leaders, the signing of the ban on sanctuary cities represented a seismic shift. Latinos make up 39 percent of Texas’ population. The biggest school district in the state, the Houston Independent School District, is 62 percent Hispanic and only 8 percent white. Hispanics have shaped the very notion of what it means to be Texan, and many had pointed with pride at the recent past.

When California voters approved Proposition 187 in 1994, which was intended to deny public services like schools and hospital care to unauthorized immigrants, Texas resisted taking similar action. When Arizona passed a law known as S.B. 1070 in 2010, giving local law enforcement broad authority to detain people suspected of being in the country illegally, Texas again resisted.

That legacy, Hispanic leaders said, ended on Sunday, with the stroke of Mr. Abbott’s pen.

“This was the first time in recent memory that the Republican Party of Texas has crossed a red line with the Hispanic community,” said Julián Castro, the Obama-era secretary of the Department of Housing and Urban Development and the former mayor of San Antonio, contrasting Texas’ response with the earlier actions in California and Arizona. Referring to George W. Bush and Rick Perry, he added: “To their credit, at the time, Governors Bush and Perry exercised admirable restraint, instead of pitching to the worst instincts and feeding the base red meat on immigration. They refused to do it. Greg Abbott is a different story.”

As in other red states, Mr. Trump looms large in the ideological background of Texas politics. The bill banning sanctuary cities — which is known as Senate Bill 4 and is set to take effect in September — was backed by Lt. Gov. Dan Patrick, who was the Texas chairman of Mr. Trump’s campaign, as well as Mr. Abbott, who told Mr. Trump “I’m proud of you” when he visited the Oval Office in March.

Much of the ultraconservative tone this legislative session has been building in Texas for years, long before Mr. Trump’s campaign, and many lawmakers said the ban on sanctuary cities would have passed regardless of who was in the White House. In 2010, when Mr. Abbott was the state’s attorney general, he signed onto a legal brief filed in federal court defending Arizona’s S.B. 1070.

State Representative Rafael Anchia, a Democrat who is the chairman of the Mexican American Legislative Caucus in the State House, said the best evidence that Senate Bill 4 preceded the rise of Mr. Trump was the series of federal court rulings since 2011 in which the Texas Legislature was found to have intentionally discriminated against Hispanics and African-Americans. “This really doesn’t arise out of Trump, but my view is that it arises out of the movement that brought Trump,” Mr. Anchia said.