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: Westlake Area Vaccine And Taco-Giveaway Event Organized By CultivaLA And County Supervisor Hilda Solis

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: Man Rushed To Burn Center In Critical Condition After East Hollywood Fire In Vacant, Two-Story House

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: Off-Duty Delta Flight Attendant Becomes Unruly, Forcing Plane From LA To Atlanta To Land In Oklahoma City

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