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: Black Friday: Another High-End Store Is Robbed, In String Of Six LA Smash-and-Grabs

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: Possible Lakewood Home Depot Robbery Suspects Arrested in Beverly Hills

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: Fox, Hield Lead Kings Over Lakers 141-137 In Triple OT

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