The National Rifle Association won a temporary injunction against the city of Los Angeles over a law it claimed violated the right to free speech and equal protection.

A federal judge on Wednesday ruled to temporarily block the city’s new law requiring potential city contractors to disclose any connections they had with the gun rights advocacy group, Fox News reported.

BREAKING: NRA v Los Angeles (C.D. CA): A preliminary injunction has been GRANTED against LA’s law requiring contractors to disclose ties to the NRA. “The Ordinance’s preamble displays a clear animus both towards the NRA and its message”https://t.co/k6WXiXkV7t pic.twitter.com/quUV4Qjnj4 — Rob (@rob99711) December 12, 2019

The preliminary injunction, granted by U.S. District Judge Stephen V. Wilson, temporarily keeps the law from being enforced as the NRA’s lawsuit against the California city – which was filed last summer – moves ahead in court. Mayor Eric Garcetti and the city clerk were removed from the case as defendants by the judge though he did not dismiss the case outright.

The city can choose to appeal the decision blocking the ordinance, which took effect in April after being passed in response to mass shootings nationwide.

“Public funds provided to such contractors undermine the city’s efforts to legislate and promote gun safety,” the law, requiring anyone wanting city contracts to disclose NRA contracts or sponsorship, stated.

The NRA can now request to make the injunction permanent as the group’s attorney Chuck Michel had called the Los Angeles law a form of “modern-day McCarthyism.”

“This is one of the largest cities in the country using its power to bully lawful businesses and individual members based on their political viewpoint,” the complaint against the city had read.

In the judge’s ruling, he noted the city’s contention that awarding contracts to those “with business ties to the NRA invariably creates more NRA membership, which leads to more pro-gun advocacy, laxer gun laws, and inevitably more mass shootings.”

“Even if this chain of logic was supported by fact, the city is not permitted to restrict political speech as a means of achieving its goal of safer cities,” Wilson said in his decision.

The Los Angeles ordinance was passed unanimously by the City Council in February and, according to the NRA’s lawsuit, it seeks to “silence NRA’s voice, as well as the voices of all those who dare oppose the city’s broad gun-control agenda.”

The gun rights group added that “the city hopes to pressure NRA supporters and members to end their relationships with NRA, reducing NRA’s funding and support. Indeed, the city’s goal is to diminish NRA’s political contributions, its membership numbers and ultimately its pro-Second Amendment speech.”

Wilson noted that comments from City Councilmember Mitch O’Farrell “confirm an overwhelming intent to suppress the message of the NRA.”

The judge says that @MitchOFarrell‘s “off-the-record statements [from Twitter] further confirm an overwhelming intent to suppress the message of the NRA.” pic.twitter.com/hVcJudDCdD — Rob (@rob99711) December 12, 2019

The city sought to have the lawsuit dismissed and claimed it was not prohibiting potential vendors from doing business with the NRA, only requiring that they disclose any relationships. The judge disagreed.

“In this case, the text of the Ordinance, the Ordinance’s legislative history, and the concurrent public statements made by the Ordinance’s primary legislative sponsor evince a strong intent to suppress the speech of the NRA.” pic.twitter.com/lG9Z3YEUUR — Rob (@rob99711) December 12, 2019

A lawsuit by the NRA against San Francisco was dropped last month over a resolution by the San Francisco Board of Supervisors which called the group a “domestic terrorist organization.”

Last year, the NRA sued New York Governor Andrew Cuomo after he pushed insurers and state-chartered banks to stop doing business with them.

The latest news on the Los Angeles lawsuit was welcomed by Twitter users.

The fact that @ericgarcetti and the City staff concocted some ridiculous correlation between @NRA membership and contractors is laughable. I’m proud to be a card carrying member and SO glad I escaped CA!! ??‍♀️✌?#HomeMeansNevada https://t.co/AWbzVds7aC — Randi Reed (@RandiReedNV) December 12, 2019

The future under Democrats. You won’t be able to get jobs if you don’t bow down to their way of life. Oh, you’re a member of the NRA? Sorry no work for you, Bye Felicia. DISGUSTING. ? https://t.co/Vb3pJF26Z3 — Patrick Rogan (@rogan1227) December 12, 2019