In a 6-3 decision, the Supreme Court has found that the federal government cannot use a decades-old ban on machine guns to ban bump stocks.

“Semiautomatic firearms, which require shooters to reengage the trigger for every shot, are not machineguns. 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,” wrote Justice Clarence Thomas.

Thomas was joined by Chief Justice John Roberts and Justices Brett Kavanaugh, Amy Coney Barrett, Samuel Alito, and Neil Gorsuch in deciding the ban was illegal.

Justices Sonia Sotomayor, Elena Kagan, and Ketanji Brown Jackson dissented.

“Congress’s definition of ‘machinegun’ encompasses bump stocks just as naturally as M16s,” wrote Sotomayor. “Just like a person can shoot ‘automatically more than one shot’ with an M16 through a ‘single function of the trigger’ if he maintains continuous backward pressure on the trigger, he can do the same with a bump-stock-equipped semiautomatic rifle if he maintains forward pressure on the gun.”

She warned that the Supreme Court’s ruling would have “deadly consequences.”

“Today’s decision to reject that ordinary understanding will have deadly consequences,” Sotomayor added. “The majority’s artificially narrow definition hamstrings the Government’s efforts to keep machineguns from gunmen like the Las Vegas shooter.”

The case involved whether a bump stock device is a “machine gun” as defined in U.S. law.

For more than a decade, the federal Bureau of Alcohol, Tobacco, Firearms and Explosives maintained that bump stocks were not machine guns as defined, and issued interpretation letters confirming that position.

The 1986 Firearm Owners’ Protection Act prohibited the ownership of machine guns with certain exceptions.

But on Oct. 1, 2017, a shooter used a bump stock to kill 60 people at a Las Vegas concert, spurring public demand for a ban on bump stocks.

The ATF reclassified bump stocks as machine guns in 2018, exposing owners to criminal liability.

A Texas man, Michael Cargill, surrendered his bump stocks, but filed a lawsuit challenging the ATF regulations. Cargill argued that the ATF exceeded its authority in defining bump stocks as machine guns.

In a concurring opinion, Alito wrote, “The horrible shooting spree in Las Vegas in 2017 did not change the statutory text or its meaning.”

“That event demonstrated that a semiautomatic rifle with a bump stock can have the same lethal effect as a machinegun, and it thus strengthened the case for amending §5845(b),” he added. “But an event that highlights the need to amend a law does not itself change the law’s meaning.”

Alito then wrote that it was Congress, not a federal agency, that should take action if necessary.

“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,” he continued.

Cargill celebrated the decision in a video posted to X, saying the ruling would “stop ATF from coming after your brace, the triggers, all different parts and pieces that they’re trying to ban.”

“As always, more guns equals less crime,” he added.

Former President Donald Trump promised to ban bump stocks if elected president.

Everytown, an organization that promotes gun control, criticized the ruling. “The Supreme Court has put countless lives in danger,” the group posted on X. “Congress can and should right this deadly wrong by passing bipartisan legislation to ban bump stocks that has already been introduced in the House and Senate.”

“Bump stocks were designed to skirt the law and mimic automatic fire. There is no reason anyone should be able to easily convert a weapon to fire 800 rounds per minute. Machine guns don’t belong in our communities,” Everytown posted.

Gun Owners of America praised the ruling in a post on X, calling it a “HUGE WIN.”

“This critical ruling protects your AR-15 from a tyrannical ATF ban. If bump stocks were machine guns then all semiautomatic firearms could also have been banned as illegal machine guns,” the organization added.

This is a breaking news story and may be updated. An earlier version of this article included an incorrect definition of bump stocks, and it has been removed.