HARTFORD, Conn. — The maker of the rifle used in the Sandy Hook Elementary School shooting asked the U.S. Supreme Court to hear its appeal Thursday of a state ruling against the company.

Remington Arms, based in Madison, N.C., cited a much-debated 2005 federal law that shields firearms manufacturers from liability in most cases when their products are used in crimes.

Gunman Adam Lanza opened fire at the Newtown, Conn., school with a Bushmaster AR-15-style rifle on Dec. 14, 2012, killing 20 first-graders and six educators.

The 20-year-old gunman earlier shot his mother to death at their Newtown home and killed himself as police arrived at the school.

The rifle was legally owned by his mother.

A survivor and relatives of nine victims filed a wrongful-death lawsuit against Remington in 2015, saying the company should have never sold such a dangerous weapon to the public and alleging it targeted younger, at-risk males in marketing and product placement in violent video games.

Citing one of the few exemptions in the federal law, the Connecticut Supreme Court ruled 4-3 in March that Remington could be sued under state law over how it marketed the rifle to the public.

The decision overturned a ruling by a trial court judge who dismissed the lawsuit based on the 2005 federal law, named the Protection of Lawful Commerce in Arms Act.

The federal law has been criticized by gun control advocates as being too favorable to gun makers, and it has been used to bar lawsuits over other mass killings.

The case is being watched by gun control advocates, gun rights supporters and gun manufacturers across the country, as it has the potential to provide a roadmap for victims of other mass shootings to circumvent the federal law and sue firearm makers.

“Congress enacted the (law) to ensure that firearms — so central to American society that the Founders safeguarded their ownership and use in the Bill of Rights — would be regulated only through the democratic process rather than the vagaries of litigation,” Remington lawyers Scott Keller and Stephanie Cagniart wrote to the U.S. Supreme Court.

Joshua Koskoff, a lawyer for the victims’ families, disagreed with Remington’s claims.

“Our state’s highest court has already ruled that the families deserve their day in court and we are confident that the U.S. Supreme Court will defer to that well-reasoned opinion,” Koskoff said in a statement.

With President Donald Trump’s nominees Neil M. Gorsuch and Brett M. Kavanaugh now on the court, conservatives are firmly in control as the justices take on divisive issues such as gun control, abortion, and LGBT rights.