ORLANDO — The gunman who opened fire inside a crowded gay bar and dance club here early Sunday, leaving 50 people dead and 53 injured in the deadliest mass shooting in U.S. history, pledged allegiance to the Islamic State in a call to police during the attack, authorities said.

On Monday, the Islamic State’s radio outlet called Omar Mateen “one of the soldiers of the caliphate in America.”

Al-Bayan Radio, a media outlet for the extremist group, hailed the attack, saying it targeted a gathering of Christians and gays and that it’s the worst attack on U.S. soil since the September 11, 2001, terrorist attacks.

The broadcast was apparently an opportunistic statement. The Islamic State has not officially claimed responsibility for the Orlando attack.

President Obama on Sunday labeled the rampage “an act of terror and an act of hate.’’ The gunman fired bullets seemingly at random inside the popular Pulse nightclub, forcing panicked patrons to dive onto the dance floor, crawl across the ground and scramble out a back entrance. He then held others hostage in a three-hour siege that ended when police stormed the building and killed him.

Witnesses described scenes of horrific carnage. Victims flooded local hospitals with gunshot wounds to their chests, legs and arms. Some had their calves and forearms blown off, doctors said. Police said the toll could have been even greater had a SWAT team not rescued 30 people and shepherded them to safety. Many of the victims were Latino; the club was celebrating “Latin Night.’’

Advertisement

“We’re dealing with something we never imagined and is unimaginable,” said Orlando Mayor Buddy Dyer, who declared a state of emergency in the city.

Mateen, a 29-year-old security guard from Port Pierce, Florida, was born in New York to Afghan parents. After his initial assault on the dance club, Mateen called 911 and pledged allegiance to the leader of the Islamic State, also known as ISIS, according to U.S. law enforcement officials, who spoke on the condition of anonymity because the FBI investigation is still in progress. During the call, Mateen made reference to the 2013 bombing of the Boston Marathon, officials said.

The shooting raised fresh alarm about the ability of overseas terrorists to wreak havoc on U.S. soil. But it also ignited fears of a broader campaign against the American gay, lesbian and transgender community as the first anniversary of the landmark Supreme Court decision legalizing same-sex marriage approaches.

In Washington, police stepped up patrols ahead of the Capital Pride Festival, one of dozens of gay pride events scheduled this month across the nation and around the world.

“As Americans, we are united in grief, in outrage, and in resolve to defend our people,’’ Obama said during a brief speech at the White House, where he said the FBI is investigating the Orlando massacre as an act of terrorism. Until Sunday, the 2007 rampage at Virginia Tech – in which 32 people died – was the country’s worst mass shooting.

Throughout the day, relatives and friends of missing clubgoers gathered at a downtown Hampton Inn & Suites to await news of their loved ones. On Sunday evening, as the names of the dead began to trickle out, the scene in the hotel’s sweltering lobby turned tragic.

Advertisement

One woman sat in a chair next to a stack of pizza boxes, sobbing and screaming. Another woman crumpled in her chair, crying, and was taken out in a wheelchair. A third woman vomited into a trash can. Others hugged, shook and softly cried as grief counselors and law enforcement officials milled about.

Condemnations of the carnage in downtown Orlando flooded the airwaves from officials and pundits across the political spectrum. But late Sunday, many questions remained unanswered. It was unclear, for example, how a lone gunman managed to hold so many people inside the nightclub for so long, whether any of the clubgoers tried to stop him and why police waited three hours to intervene. A clear timeline of events, including when the victims were killed and injured and who shot them, remained elusive.

Authorities declined to offer details. But a senior U.S. law enforcement official said officers delayed their assault on the gunman because the active-shooter scene turned into a hostage negotiation once the gunman called 911. For three hours, the gunman was on the phone with police and no shots were fired.

“That is when you do wait,” said the official, who spoke on the condition of anonymity because he was not an authorized spokesman. “It was appropriate.”

Police ultimately chose to end the standoff because of concerns about the health and safety of dozens of people who were injured and trapped inside. Officials at nearby Orlando Regional Medical Center said at least nine people died at the hospital or were dead when they arrived. It was unclear whether anyone was injured during the gunman’s final shootout with officers, although authorities said one Orlando police officer was shot but that his Kevlar helmet saved him.

The Islamic State has repeatedly executed gay people and released videos showing their gruesome executions. FBI Special Agent Ron Hopper said the bureau was still working to determine whether sexual orientation was a motive in the Orlando attack. He said investigators had found no indication that Mateen had outside help in planning the attack, nor any sign of other suspects or further threats to the public.

Advertisement

Much was also still to be learned about Mateen’s background, although details about his previous contacts with law enforcement officials began to emerge. Much like Tamerlan Tsarnaev, the older of the two brothers who carried out the Boston Marathon bombing, Mateen had been on the FBI’s radar.

Hopper, who runs the FBI’s Orlando office, told reporters that Mateen had twice been investigated by the bureau and was cleared both times.

In 2013, Hopper said agents twice interviewed Mateen after he made “inflammatory comments to co-workers alleging possible ties to terrorists.” The FBI closed the investigation after it was unable to verify the details of his comments, Hopper said.

The following year, FBI agents examined possible ties connecting Mateen to Moner Mohammad Abusalha, the first American to carry out a suicide attack in Syria. Like Mateen, Abusalha lived in Fort Pierce, Florida.

“We determined that contact was minimal and did not constitute a substantive relationship or a threat at that time,” Hopper said.

Meanwhile, Mateen’s ex-wife said in an interview Sunday that he beat her repeatedly during their brief marriage and that Mateen, who was Muslim, was not very religious and gave no indication that he was devoted to radical Islam.

Advertisement

“He was not a stable person,” said the ex-wife, who spoke on the condition of anonymity because she feared for her safety. “He would just come home and start beating me up because the laundry wasn’t finished or something like that.”

On Sunday, the gunman was armed with a handgun and an assault rifle and was carrying additional rounds.

“It appears he was organized and well-prepared,” said Orlando Police Chief John Mina.

Mateen had legally purchased the two guns – which the Bureau of Alcohol, Tobacco, Firearms and Explosives said were a .223-caliber AR-15-type assault rifle and a 9mm semiautomatic pistol – within “the last few days,” said Trevor Velinor of the ATF. The AR-15 is the civilian variant of the M16 military rifle and is one of the nation’s most popular weapons. A standard magazine carries about 30 bullets.

The violence in the crowded nightclub began as Saturday gave way to Sunday. About 2 a.m., Pulse Orlando posted an urgent message on Facebook: “Everyone get out of Pulse and keep running.”

Within minutes, police vehicles and a SWAT team descended on the club.

“I was there,” Ricardo J. Negron posted on Pulse’s Facebook page several hours later. “Shooter opened fire @ around 2:00 a.m. People on the dance floor and bar got down on the floor and some of us who were near the bar and back exit managed to go out through the outdoor area and just ran. I am safely home and hoping everyone gets home safely as well.”

Police described a hellish scene inside the nightclub, which was strewn with bodies. “It’s absolutely terrible,” Mina said. “Fifty victims in one location, one shooting.”