Families of the shooting victims tried to sue the manufacturer of the gun used in the attack.
According to ABC News, the defense for Remington Arms Company, the group that manufactures the type of gun that was used in the Sandy Hook Elementary shooting, argued that the company could not be sued because of the federal Protection of Lawful Commerce in Arms Act, which protects gun makers and sellers from liability when their products are used for criminal acts.
The 2012 shooting left 20 schoolchildren and six school employees dead.
Ten families filed the lawsuit in 2015.
ABC reports that Judge Barbara Bellis wrote in her decision that the lawsuit, which was seeking damages for harm caused "solely by the criminal misuse of a weapon," fall "squarely within the broad immunity" provided by the federal law.
Hillary Clinton's Twitter was quick to condemn the action and call for action.
Others online thought the dismissal was for the best.
The families have promised to appeal the decision.
ABC News contributed to this report.