The Trump administration can go ahead with a ban on the rapid-fire gun attachments used to carry out the deadliest mass shooting in modern U.S. history, a federal judge ruled late Monday, turning back one of the first legal challenges to the ban.

The decision by U.S. District Judge Dabney Friedrich in Washington rejected challenges to the ban on the rapid-fire attachment known as bump stocks weeks before it was scheduled to go into effect.

Friedrich rejected arguments that the rule was rushed through the administrative process, or that it was improperly issued by then acting Attorney General Matt Whitaker. She wrote that the Bureau of Alcohol, Tobacco, Firearms and Explosives was within its right to redefine ambiguous terms that the government had previously concluded constrained them to allow the devices.

"That this decision marked a reversal of ATF’s previous interpretation is not a basis for invalidating the rule because ATF’s current interpretation is lawful and ATF adequately explained the change in interpretation," Dabney wrote in her 64-page ruling.

The Firearms Policy Coalition, one of the plaintiffs in the lawsuit, denounced the ruling and vowed to appeal to reign in "a rogue and growing executive branch."

"We are disappointed but unsurprised by the court's ruling tonight denying a temporary injunction to protect Americans from an unlawful and unconstitutional regulation," the group wrote in a statement.

The case was one of at least five federal lawsuits challenging the rule issued by the Justice Department in December after a year of weighing public comment submitted to the ATF.

Friedrich also rejected an argument that the ban was unlawful because it had been approved by former acting Attorney General Matthew Whitaker, whose appointment last year was met with criticism because he had not been approved for the job by the Senate. She ruled that Trump had the power to appoint Whitaker.

Owners of the devices have until March 26 to melt, shred or crush their plastic accessories that can make off-the-shelf semi-automatic rifles fire almost as rapidly as a machine gun. Another case in Michigan has a hearing next month on a similar request for an injunction.

An appeal to another court could allow more examination of the constitutional issues, said Brandon Combs, president of the Firearms Policy Coalition.

“I don’t think anyone wants an executive branch that can just make law by fiat with whatever they want for criminal penalties behind it,” Combs said. “It’s a dangerous place for our republic to say you can buy something one day and change its mind the next and send you to prison.”

A violation of the federal ban comes with a $250,000 fine on top of a possible 10-year prison term.

The Justice Department reexamined its approach to regulating bump stocks after a mass shooting in Las Vegas in October 2017 in which a single gunman killed 58 people and injured more than 800 others.

The government had long maintained that only Congress could ban bump stocks. But pressure from President Trump and others mounted in the wake of the shooting, it reversed that view and concluded that it could ban the $200 devices under existing gun laws.

Bump stocks combined two legal devices, a plastic stock and a firearm, that together function like a machine gun. The bump stock harnesses the recoil of the rifle to accelerate trigger pulls, technically “bumping” the trigger for each shot after it bounces off the shooter’s shoulder.

The ATF said it was using its right to “reconsider and rectify” previous classification errors by changing how it considered “automatically” or “single function of the trigger.”