LAS VEGAS — Perched in his suite at a high-rise hotel overlooking the Las Vegas Strip, a 64-year-old retiree with no real criminal history and no known affiliations with terrorist groups rained bullets down into a crowd at a country music festival Sunday, killing at least 59 people and injuring hundreds more in the deadliest mass shooting in modern American history.

The attack, at least initially, was as inexplicable as it was horrifying. Law enforcement officials said they could not immediately tell what drove Stephen Paddock to fire at thousands of unsuspecting people from the 32nd floor of the Mandalay Bay Resort and Casino before killing himself.

 Authorities said a sweep of law enforcement databases showed that Paddock had no known run-ins with police, and – despite the Islamic State’s repeated claims – investigators could not find any connections to international terrorist groups. Paddock was a son of a notorious bank robber, and his own crime demonstrated some sophisticated planning.

Police said he had stayed in the large hotel suite for several days and had aroused no suspicion. He brought with him an arsenal of 23 guns – their calibers ranging from .223 to .308, some with scopes – authorities said. One of the weapons he apparently used in the attack was an AK-47-type rifle, with a stand to steady it for firing, people familiar with the case said. He fired, without warning, from an elevated position on an open-air venue, leaving his victims few options to avoid harm.

“I can’t get into the mind of a psychopath,” said Sheriff Joseph Lombardo, head of the Las Vegas police department, which is leading the investigation.

Investigators Monday searched Paddock’s home in Mesquite, Nev., and another piece of property he owned, and they hoped to review surveillance footage and other electronic equipment to determine how and why Paddock perpetrated the unprecedented massacre.

Among the questions they have: how a former accountant with a penchant for high-stakes gambling obtained a weapon that sounded to those on the ground like it could fire as an automatic, and how he was able to bring it and many other weapons into a Vegas hotel suite undetected.

Lombardo said hotel staff had been in and out of the two-room suite, where Paddock had stayed since Thursday, and had spotted nothing “nefarious,” though he had more than 10 suitcases.

“It wasn’t evident that he had weapons in his room” before the shooting, Lombardo said.

Investigators believe that at least one of the guns functioned as if it were fully automatic, and they are trying to determine if Paddock modified it or other weapons to be capable of spitting out a high volume of fire just by holding down the trigger, people familiar with the case said.

Gun purchase records indicate that Paddock legally bought more than two dozen firearms over a period of years, according to a person close to the investigation. Guns & Guitars, a store in Mesquite, said in a statement that Paddock purchased some of his weapons there, but that employees followed all procedures required by law and Paddock “never gave any indication or reason to believe he was unstable or unfit at any time.” Lombardo said Paddock also seemed to have purchased guns in Arizona.

Investigators also found at least 19 firearms, thousands of rounds of ammunition and the chemical tannerite, an explosive, at Paddock’s home in Mesquite, a little more than an hour outside Las Vegas on the Arizona border. They also found ammonium nitrate, a chemical that can be used in bombmaking, in Paddock’s vehicle, Lombardo said.

More than 22,000 people were at the Route 91 Harvest festival, a three-day country music concertat a venue across the street from the Mandalay Bay, when the shooting began about 10 p.m. Sunday, according to police. As country star Jason Aldean played what was expected to be one of the last sets of the night, Paddock opened fire – his bullets flying from a window on the casino’s golden facade, which he had smashed with some type of hammer.

Aldean fled the stage. Thousands began racing for safety under the neon glow and glitz of the Las Vegas Strip.

“People were getting shot at while we were running, and people were on the ground bleeding, crying and screaming. We just had to keep going,” said Dinora Merino, 28, a dealer at the Ellis Island casino who was at the concert with a friend. “There are tents out there, and there’s no place to hide. It’s just an open field.”

The death toll in Las Vegas was massive, surpassing the 49 people slain by a gunman in Orlando, Florida, in June 2016. That shooter, who later said he was inspired by the Islamic State, opened fire inside a crowded nightclub. And Lombardo said the number of dead from Sunday’s concert shooting could rise, as an additional 527 were thought to have been injured.

The dead included a behavioral therapist who was soon to be married, a nursing assistant from Southern California, a commercial fisherman and an off-duty Las Vegas police officer. Two other officers who were on duty were injured, police said; one was in stable condition after surgery, and the other sustained minor injuries. Another off-duty officer with the Bakersfield Police Department in Southern California also sustained non-life-threatening injuries, according to a statement from the department.

Some of the wounded were injured not by gunfire but in the ensuing chaos. One 55-year-old California woman who declined to give her last name said she was “trampled” trying to flee what she initially thought were fireworks. Clark County Fire Chief Greg Cassell said responders saw a “wide range” of injured people, including gunshot victims, those wounded by shrapnel, people who were trampled and those who were hurt jumping fences.

But those who ran said they could clearly see the gunman’s toll in the bullet wounds of those around them. Taylor Benge, 21, said that when the lights came on, he realized that “about five feet to the left of me there was a man with a bullet wound to his chin.”

“He was just lifeless on the ground,” he said. He said he and his sister threw themselves on the ground as the gunfire continued, then ran for the exit. “My jeans are covered in someone’s blood, my T-shirt is covered in someone’s blood, my sister’s whole leg was covered in blood,” Benge said.

Jonathan Smith – who came to Vegas to celebrate his brother’s 43rd birthday – was shot at least twice, including once in the neck.

“I really didn’t want to die,” Smith said.

Police and hotel security officers scoured several floors of the Mandalay Bay looking for the shooter and came upon Paddock’s suite, Lombardo said. At some point, Paddock fired through the door and hit a security guard in the leg, he said, adding that the guard is expected to survive. SWAT officers ultimately stormed the room, and some fired shots, though Paddock is believed to have killed himself, Lombardo said. He was not counted in the death toll authorities reported.

Police and hotel security officers scoured several floors of the Mandalay Bay looking for the shooter and came upon Paddock’s suite, Lombardo said. At some point, Paddock fired through the door and hit a security guard in the leg, he said, adding that the guard is expected to survive. SWAT officers ultimately stormed the room, and some fired shots, though Paddock is believed to have killed himself, Lombardo said. He was not counted in the death toll authorities reported.

President Trump ordered flags flown at half-staff and said he would visit Las Vegas on Wednesday. He praised the “miraculous” speed with which local law enforcement responded to the shooting – asserting that their actions saved lives – though he noted that hundreds were still mourning the loss of loved ones. Answers for them, he said, would “not come easy.”

“It was an act of pure evil,” Trump said during remarks from the White House.

Visitors, residents and officials filled the pews at the Guardian Angel Cathedral on Monday looking for comfort and unity during an emotional interfaith service. Hundreds of people wiped tears and embraced, and during a moment of silence, community religious leaders rang a gong 59 times to honor the dead.

Steve Sisolak, Clark County Commission Chair from Las Vegas, praised the police for their quick response and commended the outpouring of support from the community; more than 25,000 people have donated to a fundraising effort for victims and people have been waiting eight hours in line to donate blood, he said.

“Las Vegas will never be quite the same as a result of this,” Sisolak said. But, he said, “We’ll be back.”

Eric Paddock, Stephen Paddock’s brother, said he was stunned to learn that his sibling could be responsible for such violence. Stephen Paddock had no history of mental illness, nor did he have problems with drugs or alcohol, Eric Paddock said, noting that his brother was a high-stakes gambler, sometimes wagering hundreds of dollars on a single hand of video poker.

When he spoke to the FBI, Eric Paddock said, he showed agents three years of text messages from his brother, including one that mentioned winning $250,000 at a casino. A federal law enforcement official said investigators had reviewed reports suggesting that Paddock engaged in high-dollar gambling, and they are trying to determine whether he faced financial strains.

Eric Paddock said his brother was “wealthy,” in part because he had no children to support. Stephen Paddock had worked in the past as an accountant, and he had real estate investments in the Orlando area, Eric Paddock said.

Eric Paddock said he knew that his brother had guns – Stephen once took Eric’s children skeet shooting – though not the sort of weaponry that police discovered.

Police said they think Paddock was a “lone wolf” attacker, though they were still interested in speaking more with a woman named Marilou Danley who lived with him in Mesquite. Police had said they were searching for Danley, Paddock’s girlfriend, immediately after the shooting, but they later said she was outside the country – as of Monday afternoon, in Tokyo – and was not involved in the shooting.

“We still consider her a person of interest,” Lombardo said Monday. He said investigators also are exploring a report that Paddock attended a different music festival in September.

Not long after the shooting, the Islamic State claimed responsibility, though law enforcement authorities were quick to reject that assertion. “We have determined, to this point, no connection with an international terrorist group,” Aaron Rouse, the special agent in charge of the FBI in Las Vegas, said at a news briefing.

The FBI was involved in the case – and the Bureau of Alcohol, Tobacco, Firearms and Explosives was helping trace the weapons – but they said they were supporting local authorities in Las Vegas. Department of Homeland Security officials said there were no specific, credible threats to other public venues across the country.

The FBI had a previous dealing with the Paddock family, though it did not initially seem to involve Stephen. Eric Paddock said his father was Benjamin Hoskins Paddock, a convicted bank robber and con man described in a wanted poster as “psychopathic” with suicidal tendencies. But Eric Paddock said his father, who escaped from prison in 1969 and was at one point on the FBI’s list of most-sought-after and dangerous criminals, was not around during their childhood. Benjamin Paddock was apprehended in 1978, according to news reports.

Relatives said Stephen Paddock, a licensed pilot who owned two airplanes, was a quiet man who often went to Las Vegas to gamble and attend concerts. In a statement, Lockheed Martin, the defense giant, said Paddock worked for the company for three years in the 1980s.

A former neighbor of Paddock’s recalled that his home in a 55-and-over community in Florida looked more akin to a college freshman’s dorm room, with bare walls and only a few pieces of furniture.

“One of the first times we met him, he told me he lived there, in Vegas,” recalled Don Judy, his next-door neighbor in the community until two years ago. “He explained that he was a gambler and a prospector. He said he was buying this house to check it out for his mother . . . and that if she liked it, he planned to buy another next door with a floor plan like ours.”

Soon, Judy said, Paddock put up a for-sale sign and was gone, saying he was moving back to Las Vegas.

Videos posted from people who said they were at the scene showed people screaming and running for cover amid the sound of gunshots that seemed unending. “We thought it was fireworks at first or trouble with the speakers,” said Kayla Ritchie, 21, of Simi Valley, California. “They had been having technical difficulty all weekend. Then everything went dark.”

Ritchie traveled with Megan Greene, 19, for the concert, and the two were separated when people began fleeing. They found each other hours later. “Everyone started running for the exit,” said Greene, who hid behind a truck before running into the MGM Grand. “We were in the street, and they told us to get down, get down.”

Former Boston Red Sox pitcher Mike Timlin was at the concert and tweeted that he was OK.

Taylor Benge, 21, was at the concert Sunday night and said he heard a round of pops that lasted for 10 seconds, as if someone was holding down the trigger. When a performer ran off the stage and the lights came on, Benge said, he realized that “about five feet to the left of me there was a man with a bullet wound to his chin.”

“He was just lifeless on the ground,” Benge said.

At least some people were injured in the frenzied effort to flee the gunfire. Tracy, 55, a California woman who declined to give her last name, said she was “trampled” trying to flee.

“We thought it was fireworks,” she said, a dazed look on her face and a bandage on her injured knee and shin. “We ran for our lives. We went into Hooters and hid in the bathroom. We felt like sitting ducks there. We went to the second-floor conference room and stayed there.”

A friend came with a mini bus, so Tracy and another friend ran out to the vehicle, terrified to go out on the street again. “Who thinks people would do something like this in America?” Tracy said.

Corianne Langdon, 58, a cabdriver in Las Vegas for the last 6 ½ years, said she was about seven cars back in the taxi line at Mandalay Bay when the gunfire began and began to drive away, seeing police crouching in the street and hundreds of people running away from the concert – some jumping the fence on the side of the venue.

“I had people hanging out of my windows,” Langdon said. “They were screaming, they were so upset, and it just wasn’t getting to me yet the severity of what was going on.”

Those injured in the shooting also included an off-duty officer with the Bakersfield Police Department in Southern California, who was taken to a hospital for nonlife-threatening injuries, according to a news statement. Several of the department’s officers were off duty and attending the concert when the gunfire erupted.

The shooting came as security measures at many music venues have been boosted in recent years after concerts were targeted in terrorist attacks. In May in northern England, a bomb exploded at a concert by American singer Ariana Grande in Manchester, killing 22 people; in November 2015, Islamist attackers opened fire at a rock concert in Paris as part of coordinated attacks that left 130 dead. In both of those cases, the Islamic State claimed responsibility for the attacks.

In Manila in June, a 42-year-old Filipino gunman armed with a rifle and a bottle of gasoline burst into a casino and set a fire, killing 37 people. Police said the attack was motivated by gambling debts and other personal problems facing the gunman, who fatally shot himself. The Islamic State also claimed responsibility for that attack, but officials repeatedly denied it was terrorism-related.