A federal judge ruled Tuesday that the law banning assault rifles in the state of New York will stay in effect.

Chief U.S. District Judge William M. Skretny said the SAFE Act, passed almost a year ago in response to the Sandy Hook Elementary shootings that killed 26 people, does not violate the Second Amendment, The Buffalo News reported.

"The Court finds that the challenged provisions of the SAFE Act, including the Act's definition and regulation of assault weapons and its ban on high-capacity magazines, further the state's important interest in public safety," the judge said in his ruling, according to The Buffalo News.

The SAFE Act bans assault weapons and semi-automatic weapons that mimic regular assault ones. Ammunition magazines that take more than 10 rounds are also banned, and users cannot load the gun with more than seven rounds.

However, Skretny did strike down a key measure of the SAFE Act which restricts the amount of ammunition magazines to seven rounds.

"The seven-round limit fails the relevant test because the purported link between the ban and the state's interest is tenuous, strained, and unsupported in the record," Skretny said in his ruling, Newsday reported.

Gun rights groups have argued that the law is biased against gun owners.

Skretny agreed, saying that the court cannot support "the predictive judgments of the legislature to suppose that those intent on doing harm (whom, of course, the Act is aimed to stop) will load their weapon with only the permitted seven rounds," and thus, "the provision is not 'substantially related' to the important government interest in public safety and crime prevention," Newsday reported.

The judge's decision is just one ruling in what is shaping up to be a long, national battle over gun control. The New York State Rifle & Pistol Association filed court documents challenging the Safe Act. The case could be heard by the U.S. Supreme Court.

"Our Constitution is designed to maximize individual freedoms within a frame work for ordered liberty," Skretny wrote, according Newsday. "The Supreme Court found that the right to 'keep and bear arms,' enshrined in the Second Amendment, was among those individual freedoms. But the Court also noted that the right was not unlimited."