WASHINGTON -- The city of San Antonio is suing the state of Texas and its governor to stop the state from implementing its new immigration enforcement law known as SB4.

The Mexican American Legal Defense and Educational Fund filed the lawsuit Thursday in federal district court in San Antonio on behalf of the city, three non-profit organizations and San Antonio City Council Member Rey A Saldaña.

MALDEF is arguing in the lawsuit that the law, signed by Texas Gov. Greg Abbott last month, is unconstitutional on many fronts, threatens to unleash arbitrary and inconsistent law enforcement across the state and is discriminatory.

The lawsuit names the state, Abbott and Ken Paxton, Texas’ attorney general, as defendants.

Marisa Bono, MALDEF’s southwest regional counsel, told reporters in a telephone news conference that the law forces cities like San Antonio to enforce immigration law even though courts, including the U.S. Supreme Court, have ruled against local officials taking on that role.

“It’s disgraceful that in this day and age we still have to fight hateful and misguided legislation like this in court, especially when so many similar attempts have failed across the country,” said Marisa Bono, MALDEF’s southwest regional counsel.

At the heart of the challenge is the contention that the law strips cities, sheriffs and police chiefs of their authority to set polices on how their officers do immigration checks and leaves it up to each individual officer to decide whether and how they will do so.

That will result in racial profiling and violations of the equal protection guarantees in the 14th Amendment because Latinos and other minorities will be subject to discriminatory stops and questioning by officers about their citizenship or their immigration status, said Thomas Saenz, MALDEF president and General Counsel.

Under the law, public officials, sheriffs and others could be removed from office and fined heavy penalties for non-compliance.

“We think SB4 is discriminatory given the unfettered nature to which it requires enforcement of immigration laws, local participation in that. It will inevitably lead to targeting of minorities,” said Andrew Segovia, San Antonio’s city attorney.

The lawsuit follows intense protests against the law in the state’s Capitol on the final day of the state’s legislative session Monday.

Related: Opinion: Calling Immigration on Latinos Protesting SB4 Is Racial Profiling

Angered by the protests, GOP Rep. Matt Rinaldi told Mexican American lawmakers and posted on Facebook that he had called Immigration and Customs Enforcement, or ICE, on the protesters, many of whom were Latino, touching off a shouting match and near brawl between the lawmakers.

Rinaldi’s actions are included in the lawsuit. Bono said those comments will be used to show the racial intent behind SB4.

“Rep. Matt Rinaldi taunted Latino lawmakers, saying ‘I called ICE on all of them … They need to deport all these illegals,’” the suit says. “Rep. Rinaldi’s statement implies an assumption that all of the members in the gallery were undocumented because they appeared to be ‘Latino.’”

Gov. Abbott has defended SB4 as intended to protect public safety by banning so-called sanctuary cities, those that regulate how their police conduct immigration checks.

The three non-profit groups also suing are La Union de Pueblo Entero, founded by civil rights leader César Chávez and based in Texas’ Rio Grande Valley, Texas Association of Chicanos in Higher Education and Austin-based Workers Defense Project, which represents low-income workers.

José Garza, executive director of Workers Defense Project, said Abbott “picked a fight with Texas families” by signing SB4. “That is not a fight he is going to win,” Garza said.

Immediately after the law was passed, the state filed a lawsuit against the city of Austin, Travis County and MALDEF claiming they were “hostile” to federal immigration law enforcement.

On Friday, the city of Austin filed a court action to join in the lawsuit. Gregorio Casar, an Austin City Council member, called the law immoral and unconstitutional.

The city of El Cenizo and El Paso also have filed lawsuits against the state.

“I expect more cities and counties will follow," Casar said.

Follow NBC News Latino on Facebook, Twitter and Instagram.