WASHINGTON — The Trump administration on Tuesday issued a new rule banning bump stocks, the attachments that enable semiautomatic rifles to fire in sustained, rapid bursts and that a gunman used to massacre 58 people and wound hundreds of others at a Las Vegas concert in October 2017.

The new regulation, which had been expected, would ban the sale or possession of the devices under a new interpretation of existing law. Americans who own bump stocks would have 90 days to destroy their devices or to turn them in to the Bureau of Alcohol, Tobacco, Firearms and Explosives. The Justice Department said A.T.F. would post destruction instructions on its website.

Bump stocks work by harnessing a firearm’s recoil energy to slide it back and forth to bump against a squeezed trigger, so that it keeps firing without any need for the shooter to pull the trigger again. The Justice Department said that this function transforms semiautomatic weapons, like assault rifles styled on the AR-15, into fully automatic machine guns, which Congress sharply restricted in 1986 — allowing the ban.