LOS ANGELES (CBSLA/AP) — The National Rifle Association is suing Los Angeles over a new law requiring companies that want city contracts to disclose whether they have ties to the gun rights group.

The lawsuit filed Wednesday claims the law violates the NRA’s First Amendment right to free speech and association and its 14th Amendment right to equal protection.

READ MORE: CDC, FDA Recommend Pausing J&J Vaccine Over Blood Clot Cases

The city says it will vigorously defend the ordinance, which took effect April 1. It does not ban NRA-linked contractors from doing business with the city, but requires them to disclose any contracts or sponsorships they have with the gun rights advocacy group.

READ MORE: 'It's Heartbreaking': ArcLight Cinemas, Pacific Theatres Closing Permanently Due To Pandemic Losses

Councilman Mitch O’Farrell sought the ordinance in the wake of recent U.S. mass shootings, called the suit “an act of desperation by an organization in
trouble.”

NRA attorney Chuck Michel calls the law “modern-day McCarthyism” that would force NRA supporters to drop their memberships for fear of losing their livelihoods. Michel says he’s confident no judge will uphold it.

MORE NEWS: 'We Are Seeing Our Economy Come Back To Life': Study Shows That Consumer Confidence In OC Is On The Rise As Residents Brace For Light At The End Of The Tunnel

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)