A federal judge has ruled that the Second Amendment does not protect a citizen’s right to own an AR-15 rifle and other, similar semi-automatic “military style” rifles and high capacity magazines.

“AR-15s and [large capacity magazines] are most useful in military service, they are beyond the scope of the Second Amendment ... and may be banned,” Massachusetts District Court Judge William Young wrote in his ruling.

The year-old case was first brought to court in January 2017 by a group of gun owners, the nonprofit Gun Owner’s Action League, and gun stores in the state.

Those plaintiffs had filed their lawsuit after the state’s attorney general, Maura Healey, announced in the aftermath of the 2016 Orlando, Florida shooting at the Pulse nightclub that the state would begin enforcing its 1998 ban on assault weapons. The Pulse shooting was, at the time, the deadliest mass shooting in modern American history.

Following Mr Young’s ruling, Ms Healey issued a statement praising the decision and vowing to push back against the gun lobby that has wielded intense power across the country in recent decades.

“Today’s decision upholding the Assault Weapons Ban vindicates the right of the people of Massachusetts to protect themselves from these weapons of war and my office’s efforts to enforce the law,“ Ms Healey said in the statement. ”Strong gun laws save lives, and we will not be intimidated by the gun lobby in our efforts to end the sale of assault weapons and protect our communities and schools. Families across the country should take heart in this victory.”

March for Our Lives – in pictures Show all 13 1 /13 March for Our Lives – in pictures March for Our Lives – in pictures Demonstrators chant during the protest for gun legislation and school safety AP March for Our Lives – in pictures Trevon ‘Tre’ Bosley, 19, of Chicago, the brother of Terrell Bosley who was killed in 2006 in a case of mistaken identity, speaks during the rally AP March for Our Lives – in pictures Marjory Stoneman Douglas High School student Delaney Tarr speaks at the rally AFP/Getty March for Our Lives – in pictures Protestors line the streets in Washington Getty Images March for Our Lives – in pictures People arrive for the March For Our Lives rally against gun violence in Washington, DC AFP/Getty March for Our Lives – in pictures Protestors carrying placards in Washington AFP/Getty March for Our Lives – in pictures Protestors hold up placards in Washington AFP/Getty March for Our Lives – in pictures Schoolchildren wear targets ahead of the rally Getty March for Our Lives – in pictures Attendees congregate in preparation for the march Getty March for Our Lives – in pictures Students brought a host of innovative placards AFP/Getty March for Our Lives – in pictures The movement’s main demand is the banning of assault rifles Getty March for Our Lives – in pictures Since the Florida shooting, students have called for urgent gun reform AFP/Getty March for Our Lives – in pictures In the wake of the Florida attack, President Donald Trump called for teachers to be armed AFP/Getty

Ms Healey’s office has said that sales of the assault-style semi-automatic weapons has virtually ended since she began enforcing the 1998 law. As many as 10,000 of those weapons were sold the year prior.

In writing his decision, Mr Young made reference in large part to the landmark 2008 Supreme Court case District of Columbia v Heller, in which Justice Antonin Scalia wrote a majority ruling that largely upheld an individual’s right to own a firearm but noted that there are limitations of the Second Amendment.

Mr Young, in his decision, called Mr Scalia’s 2008 writing a “tour de force” on the Second Amendment and said that many of the features of AR-15 rifles and large capacity magazines are designed with the intent for military use and not for civilian use, and are therefore not protected by the Second Amendment.