The Supreme Court on Thursday issued a ruling that overturns a Trump era ban on the gun attachments known as bump stocks, largely because it was done by a federal agency and not by Congress. In writing for the majority, Justice Clarence Thomas notes that the late Senator Dianne Feinstein predicted this would happen.

A 2017 federal ban on bump stocks, the devices which turn semiautomatic weapons into virtually automatic ones, which was enacted by the Bureau of Alcohol, Tobacco, Firearms and Explosives (ATF) in the wake of the deadly mass shooting in Las Vegas, was an overreach of government-agency authority, the Supreme Court ruled today. That shooting took the lives of 60 people and wounded over 400 others, and was done at the hands of a single crazed man for reasons that we will likely never know.

The breadth of the carnage was only possible because of the bump stocks that the shooter had attached to his rifles, and there was immediate, bipartisan support for a federal ban on them. There were calls in Congress for some immediate gun-control legislation, including a ban on bump stocks, but none of these proposed bills became law, and sensing the ongoing impotence of the closely divided Congress, and not looking for a Second Amendment fight, the Trump administration looked to the ATF to redefine its longstanding ban on "machineguns" — dating back to a 1934 law — to include bump stocks.

In today's 6-3 majority opinion, Justice Clarence Thomas gets very into the weeds when it comes to the definition of "machinegun" and "automatic weapon," and takes pains to explain the mechanics of triggers and bump stocks.

"This case asks whether a bump stock — an accessory for a semiautomatic rifle that allows the shooter to rapidly reengage the trigger (and therefore achieve a high rate of fire) — converts the rifle into a 'machinegun.' We hold that it does not," Thomas writes.

But this isn't actually a case about the legality of different types of weapons where the Second Amendment is concerned. It's about limiting the powers of federal agencies — which is a longtime goal of the conservative legal movement. As the New York Times notes today, the case before the court was brought by Michael Cargill, "a gun shop owner in Texas, backed by the New Civil Liberties Alliance, an advocacy group with financial ties to Charles Koch." Koch's organization "primarily targets what it considers unlawful uses of administrative power," the Times writes.

And longtime gun-control advocate Dianne Feinstein, who died in September, is cited in Thomas's opinion to support the point that the ATF overstepped in take its action on bump stocks seven years ago.

"ATF’s about-face drew criticism from some observers, including those who agreed that bump stocks should be banned," Thomas writes in the majority opinion. "Senator Dianne Feinstein, for example, warned that ATF lacked statutory authority to prohibit bump stocks, explaining that the proposed regulation 'hinge[d] on a dubious analysis' and that the 'gun lobby and manufacturers [would] have a field day with [ATF’s] reasoning' in court... She asserted that 'legislation is the only way to ban bump stocks.'"

Feinstein held a press conference after the 2017 shooting, and told the media that her own daughter had plans to attend the Route 91 Harvest music festival in Las Vegas but decided not to go.

"In just nine minutes, one individual was able to turn a concert venue into a battlefield," Feinstein said, in arguing against the legality of bump stocks. "One person, nine minutes, utter devastation."

The October 2017 press conference was intended to announce a bill Feinstein had just introduced, similar to one she had introduced in 2013 following the Sandyhook massacre, that would ban various types of trigger cranks, bump stocks, and other similar devices that she referred to as loop holes in current regulations on automatic weapons.

Feinstein added, "Closing this loophole shouldn't be a partisan issue."

Justice Samuel Alito issued a separate, concurring opinion Thursday, apparently to make a point about the Las Vegas tragedy.

"An event that highlights the need to amend a law does not itself change the law’s meaning," Alito writes of the shooting. "There is a simple remedy for the disparate treatment of bump stocks and machineguns. Congress can amend the law — and perhaps would have done so already if ATF had stuck with its earlier interpretation. Now that the situation is clear, Congress can act."

The three liberal justices dissented, with Justice Sonia Sotomayor writing for the minority. "Today, the Court puts bump stocks back in civilian hands. To do so, it casts aside Congress’s definition of 'machinegun' and seizes upon one that is inconsistent with the ordinary meaning of the statutory text and unsupported by context or purpose," Sotomayor writes. "When I see a bird that walks like a duck, swims like a duck, and quacks like a duck, I call that bird a duck."

Sotomayor goes on pick apart the majorities distinctions between semiautomatic and automatic weapons, and adds, "The majority’s artificially narrow definition hamstrings the Government’s efforts to keep machineguns from gunmen like the Las Vegas shooter."

Previously: Sen. Dianne Feinstein Says Daughter Was Supposed To Go To Las Vegas Music Festival