Connecticut’s highest court has cleared the way for families of nine victims of the Sandy Hook Elementary School shooting to sue over the marketing of the semiautomatic rifle Adam Lanza used to kill.

The families argued that the manufacturer, distributor and seller of the weapon negligently entrusted to civilian consumers an assault rifle that is suitable for use only by military and law enforcement personnel and violated the Connecticut Unfair Trade Practices Act (CUTPA) through the sale or wrongful marketing of the rifle.

The lawsuit, which lists Bushmaster Firearms International as the defendant, has already overcome years worth of legal hurdles after first being filed more than four years ago, more than two years after the shooting at the Connecticut school left 26 people dead.

The families released a statement saying that they are "grateful that our state’s Supreme Court has rejected the gun industry’s bid for complete immunity, not only from the consequences of their reckless conduct but also from the truth-seeking discovery process," said attorney Josh Koskoff of Koskoff, Koskoff & Bieder.

"The families’ goal has always been to shed light on Remington’s calculated and profit-driven strategy to expand the AR-15 market and court high-risk users, all at the expense of Americans’ safety. Today’s decision is a critical step toward achieving that goal," Koskoff said in the statement, referencing Remington Outdoor Company which owns Bushmaster.

The lawsuit, which was filed in 2015, was dismissed in 2016 by a lower court, ruling that gunmakers have broad immunity from liability under a federal law known as PLCAA, the Protection of Lawful Commerce in Arms Act. The case was then moved up to the state's highest court, and the decision to move forward was issued Thursday.

At a November 2017 hearing, Koskoff argued that the company targeted people like the Sandy Hook shooter with their marketing, using "images of soldiers in combat" and referring to "missions" where the guns could be used.

“Remington may never have known Adam Lanza but they had been courting him for years," Koskoff said in that 2017 hearing.

Defense attorney James Vogts conceded at that same hearing that “what happened in the school that morning was horrific.”

But, Vogts quickly added, “the law needs to be applied dispassionately. The manufacturer and the sellers of the firearm used that day are not legally responsible for his crimes and harms that he caused.”

ABC News' Meghan Keneally and Emily Shapiro contributed to this report.