Minnesota Attorney General Keith Ellison's lawsuit against Fleet Farm, accusing the retailer of repeatedly selling guns to "straw purchasers" who turn around and resell them to violent criminals, has survived a legal challenge.

U.S. District Judge John Tunheim ruled Tuesday against Fleet Farm's argument that the federal Protection of Lawful Commerce in Arms Act shields the Wisconsin-based retailer from being sued. The act grants the firearms industry widespread protection from litigation.

The state "has plausibly alleged that Fleet Farm knew or should have known that it was selling firearms to straw purchasers," Tunheim wrote.

The state's allegations against Fleet Farm, spelled out in a lawsuit filed in October, are "clear examples of how illegally obtained firearms endanger the public in a way that legal firearms typically do not," Tunheim wrote.

Ellison called Tunheim's decision "an important step toward ensuring gun dealers are held accountable when they look the other way while selling to straw buyers. It also sends a clear message that federal law should not — and does not — shield gun dealers from liability if they ignore obvious red flags and sell to straw purchasers."

Also Tuesday, Tunheim rejected Ellison's motion that the federal court "lacks subject matter jurisdiction" and that the case belongs in state court, where the suit was initially filed. He said the suit raises a "substantial federal issue."

The resolution of this case, the judge wrote, "is likely to have a substantial impact on how future firearm retailers — in and out of Minnesota — act in similar circumstances. Therefore, the court concludes that the federal issue in this case is substantial."

Jon Austin, a spokesman for Fleet Farm, declined to comment.

The suit cites two straw buyers convicted in U.S. District Court. Jerome Horton bought 24 guns from Fleet Farm between June and October 2021. Sarah Elwood purchased 97 firearms from nine gun dealers in Minnesota between May 2020 and May 2021, including 13 from Fleet Farm.

One of those guns, acquired in a straw purchase at the Fleet Farm in Blaine, was used in a 2021 shootout in a St. Paul bar that left one woman dead and 14 bystanders wounded.

Ellison said that the case now moves into the discovery phase in an effort "to uncover everything that Fleet Farm knew about these straw purchasers and what Fleet Farm did — if anything — to keep the public from being harmed by these purchases."

According to its website, Fleet Farm has 17 locations in Minnesota and the others among its 48 overall are in Iowa, North Dakota, South Dakota and Wisconsin.

Correction: An earlier version of this story misstated the origin of the motion to have the case moved to state court. That motion came from the state Attorney General's Office.