The gunman who authorities said killed at least 59 people at a Las Vegas music festival appears to have used at least one rifle outfitted with a device that allowed the weapon to fire at a rapid rate, and had nearly two dozen firearms in his hotel room, law-enforcement officials said.

Investigators found 23 firearms in a room on the 32nd floor of the Mandalay Bay Resort and Casino. The weapons included AR-15-style and AK-47-style rifles as well as a large cache of ammunition, two law-enforcement officials said.

At least one of the guns was outfitted with a “bump stock,” a device that allows the weapon to increase the rate of fire on a semiautomatic rifle, one of the officials said.

The​gunman alternated between two windows in the hotel room, ​firing​upon thousands of concertgoers below, ​one official said. The staccato of automatic gunfire could be heard in videos of the shooting that were posted online. ​

The suspect, 64-year-old Stephen Paddock, killed himself before police entered the hotel room, authorities said.