The National Rifle Association announced on Wednesday that it will be supporting a lawsuit filed by a local gun-rights organization against New Jersey's law requiring the destruction or surrender of certain ammunition magazines.

The NRA said it is backing the Association of New Jersey Rifle & Pistol Clubs in their lawsuit against the state. The lawsuit, filed on Wednesday, claims the new law could affect as many as one million New Jersey gun owners and is an unconstitutional violation of the Second Amendment. The NRA described the law as an undue restriction on law-abiding New Jerseyans and ineffective at fighting crime.

"Magazine bans do not deter criminals or improve public safety," Chris Cox, executive director of the NRA's Institute for Legislative Action, said in a statement. "Instead, they irrationally burden the rights of law-abiding gun owners. The National Rifle Association is proud to assist the Association of New Jersey Rifle and Pistol Clubs in this legal challenge."

The law, signed by Gov. Phil Murphy on Wednesday along with five other new gun laws, gives New Jersey gun owners who currently possess ammunition magazines exactly 180 days to either surrender their ammunition magazines, permanently modify them to only accept up to 10 rounds, or transfer them to somebody who is allowed to legally own it such as those living in most other parts of the United States. If someone in New Jersey is caught with a magazine capable of holding more than 10 rounds after the deadline is passed, it will be considered a crime of the fourth degree which carries up to 18 months in prison and up to $10,000 in fines or both.

Nearly all full-size and compact handguns as well as many rifles come standard with ammunition magazines capable of holding more than 10 rounds.

The Association of New Jersey Rifle & Pistol Clubs said it acted immediately to try and block the law because it could turn a million New Jersey gun owners into criminals.

"This unconstitutional law will be ignored by criminals and madmen, and affects only law-abiding citizens," Scott Bach, the group's executive director, said in a statement. "It turns one million people into criminals with the stroke of a pen, limits self-defense, and takes away property lawfully acquired. Buy it yesterday, ban it today, go to prison tomorrow—it's the Jersey way, and the goal of our lawsuit is to boot this law, which makes no one safer, into the trash heap of history where it belongs."

The New Jersey Office of the Attorney General did not immediately respond to a request for comment.