A gunman opened fire on a gay nightclub in Orlando, Fla., early Sunday morning, killing at least 50 people in the deadliest mass shooting in U.S. history before being shot dead by police.

The suspected shooter has been identified by authorities as Omar Mateen, a 29-year-old U.S. citizen who had previously been interviewed by the FBI over possible ties to a terrorist. Officials told NPR that Mateen pledged allegiance to ISIS in a 911 call before the attack.

Over the past several days, Mateen legally purchased a long gun and a handgun, the ATF said during a news conderence. During the attack, the shooter was armed with an AR-15-style rifle and a handgun.

The shooter began firing on clubgoers at Pulse Orlando shortly after 2 a.m. ET. He exchanged shots with police before taking dozens of people hostage. After a nearly three-hour standoff, police stormed the building and killed the shooter.

Authorities had initially said about 20 people died in the attack, but when they entered the building they found far more victims than they expected, Orlando Police Chief John Mina said. At least 50 people died, and at least 53 were injured.

Police said they have not confirmed if Pulse was targeted specifically because it is a gay nightclub.

The Suspected Shooter

Tampa FBI Assistant Special Agent-in-Charge Ronald Hopper identified the suspect as Omar Mateen — a 29-year-old U.S. citizen born in New York.

Hopper said the FBI had previously carried out two separate investigations of Mateen. They interviewed him twice in 2013 "when he made inflammatory comments to coworkers alleging possible terrorist ties" — but were "unable to verify the substance of his comments." He was interviewed again in 2014 over possible ties to U.S. suicide bomber Moner Mohammad Abusalha — but they determined the contact was "minimal" and did not constitute a threat.

According to a search of public records, Mateen is listed as living in Florida's St. Lucie County. The search shows that Mateen had a firearm license and he received a security officer license in both 2011 and 2013. The search did not turn up any criminal record.

Two federal officials briefed on the Orlando shooting told NPR's Carrie Johnson that Mateen pledged allegiance to the Islamic State in a 911 call prior to the attack. They added that there is no current imminent threat to Orlando.

A release purportedly from ISIS' media arm circulating on social media stated that the attack was carried out by an Islamic State fighter — but the group presented no evidence to that effect and U.S. national security officials so far have not made any definitive connection.

In remarks Sunday, President Obama said that "although it's still early in the investigation, we know enough to say this was an act of terror and an act of hate. As Americans, we are united in grief, in outrage, and in resolve to defend our people."

The Attack

The shooter opened fire at Pulse at approximately 2 a.m. ET in an attack that later developed into a hostage situation.

"Everyone get out of pulse and keep running," Pulse Orlando posted to its Facebook page at 2:09 a.m.

Mina said some 320 people were at the club, which according to its Facebook page has a Latin Night on Saturdays. He described how the events unfolded:

"At approximately 0202 hours this morning, we had an officer working at Pulse nightclub, who responded to shots fired. Our officer engaged in a gun battle with that suspect. That suspect at some point went back inside the club, where more shots were fired. This did turn into a hostage situation. Obviously multiple officers from various agencies responded, SWAT team responded. At approximately 0500 hours this morning, the decision was made to rescue hostages that were in there."

Police were being contacted by people trapped inside the nightclub, he said, and "our biggest concern was future loss of life. We want to save those people."

Law enforcement used explosive devices and an armored vehicle to blast through a wall, he said, where a gunfight ensued with the suspect, ultimately killing him.

"There were at least 30 people who were saved during that rescue," Mina said.

A police officer was injured in the shooting of the suspect, Mina said, adding that the officer's Kevlar helmet likely saved his life. More than a dozen law enforcement officers were involved in that shooting.

Mina said authorities were in the process of identifying victims and that it could take some time.

The Investigation So Far

Federal and local law enforcement said they were classifying the shooting as an incident of domestic terrorism.

"This is clearly an act of terror," Florida Gov. Rick Scott told reporters. "For somebody to go in there and be an active shooter, and take that number of lives ... and injure that many people is clearly an act of terror."

Scott has declared a state of emergency in Orange County "to make sure all the resources that would be necessary for the city and the county ... anything that would be needed from the state is available immediately."

Hopper said law enforcement was looking into "all angles" regarding motivation for the attack. The FBI has now taken the lead on the investigation.

Mina said the shooter was carrying a handgun, an AR-15-type rifle and an unknown number of rounds and that he appeared to be "organized and well-prepared."

The suspect purchased at least two firearms — a handgun and a long gun — within the "last few days," according to Trevor Velinor, assistant special agent-in-charge of Tampa's Bureau of Alcohol, Tobacco, Firearms and Explosives. "He's not a prohibited person, so he can legally walk into a gun dealership and acquire and purchase firearms. He did so."

Massachusetts police are investigating reports that "during his rampage" the shooter referenced Dzhokhar and Tamerlan Tsarnaev, the brothers behind the 2013 Boston Marathon bombings.

Authorities said it is not clear whether Pulse Orlando was targeted specifically because it is a gay nightclub. "We don't know that that had any specific impact on the actions taken this evening, at least not yet," Hopper says.

Terry DeCarlo, head of the GLBT Center Of Central Florida, told reporter Catherine Welch of Orlando's WMFE that the group was opening crisis hotlines to help the LGBT community.

"We can't confirm — and I've talked extensively with the police department — that it was a direct hate crime against the LGBT community, it could have just been a person looking for a packed nightclub to go in and start shooting. We can't confirm that yet," he said. He added that his main concern now is providing support for community members and their families.

Mourning The Victims

Gov. Scott called on all citizens of the United States to hold a moment of silence at 6 p.m. ET tonight "to mourn the loss of life and pray for those still fighting for their life." All Major League Baseball clubs were holding a moment of silence to honor the victims, the MLB tweeted. The Human Rights Campaign said it will be marching in silence today during a pride parade in Los Angeles.

"This tragedy has occurred as our community celebrates pride, and now more than ever we must come together as a nation to affirm that love conquers hate," HRC President Chad Griffin said in a statement.

A statement from the White House said that President Obama has "directed that the federal government provide any assistance necessary to pursue the investigation and support the community." It added: "Our thoughts and prayers are with the families and loved ones of the victims."

Meanwhile, many families wait for news about their loved ones. Weekend Edition Sunday spoke with Natalie Murray, who said her daughter called her from the club saying "she was afraid, she was hurt." Murray said she had not heard from her daughter since.

"I'm destroyed, I'm hurt, I'm frazzled, I'm frightened. I'm all over the place. I just need to see my daughter and talk to her," Murry said. "We expected them to be safe and be able to go to the club and just have a nice time. I just never imagined something like this happening."

Sunday's horrific attack comes a day after a gunman shot and killed singer Christina Grimmie at an Orlando concert venue, though police emphasized that they see no indication the two events are connected.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.