A Connecticut judge on Friday dismissed a lawsuit filed by the families of some of the 26 young children and adults killed at the Sandy Hook Elementary school in 2012, saying the maker of the rifle used in the attack had "broad immunity" under federal law.

The lawsuit, filed in December 2014 and seeking unspecified financial damages, said the AR-15 military-style assault weapon used in the attack in Newtown, Connecticut, should never have been sold to the gunman's mother, Nancy Lanza, because it had no reasonable civilian purpose.

Superior Court Judge Barbara Bellis sided with Remington Arms, the North Carolina-based maker of the rifle known as the Bushmaster that 20-year-old Adam Lanza used in his rampage at Sandy Hook. The 2005 Protection of Lawful Commerce in Arms Act protected Remington from being sued for the use of its products in an illegal manner, Bellis ruled.

"The present case seeks damages for harms, including the deaths of the plaintiffs' decedents that were caused solely by the criminal misuse of a weapon by Adam Lanza," Bellis wrote in a 54-page decision. "This action falls squarely within the broad immunity provided by PLCAA."

An attorney for the families vowed to appeal the decision.

"While the families are obviously disappointed with the judge's decision, this is not the end of the fight," attorney Josh Koskoff said in a statement. "We will appeal this decision immediately and continue our work to help prevent the next Sandy Hook from happening."

Remington could not be reached for immediate comment.

Lanza began his Dec. 14, 2012, attack by shooting his mother dead in their home and ended it by turning his gun on himself as he heard police sirens approach.

So-called assault rifles like the Bushmaster, capable of inflicting rapid carnage, have been used in several recent mass shooting in the United States. Those include the June attack on a gay nightclub in Orlando, Florida, that took 49 lives and was the deadliest shooting in U.S. history.

The AR-15 was developed from the U.S. military's M-16 rifle, used in the Vietnam War in the 1960s. Unlike the military version, the AR-15 is not fully automatic, meaning users must pull the trigger each time they want to fire a shot.