A gunman opened fire on a crowded nightclub in Orlando early Sunday, June 12. He killed at least 49 people. The final death toll is not known, but this shooting is already the deadliest mass shooting in the history of the United States. (Monica Akhtar/The Washington Post)

Following the attack in Orlando that left at least 50 people dead and another 53 injured, details are still emerging about what exactly happened. Here is a rundown of what we know and what we still don’t know about the violence in Orlando.

What we know so far about the Orlando attack

The deadliest mass shooting in U.S. history: The 103 people believed to be injured during this rampage — 50 of them fatally — represents the worst single shooting rampage in the country’s history. Before Sunday, the deadliest event for a shooting spree like this was the 2007 attack at Virginia Tech, which killed 32 people.

An active shooter attack shifted to a hostage standoff: After gunshots rang out inside Pulse, people in the club dove to the floor and ran for safety. Shooting rampages have become distressingly routine parts of American life, taking lives in churches in South Carolina, community colleges in Oregon and office holiday parties in San Bernardino, Calif. In this case, it shifted to something that rarely unfolds after such attacks: a hostage scene. For about three hours after the initial gunfire, police and the gunman engaged in a standoff and, according to law enforcement officials, communicated during this time. In the end, police headed inside to free the hostages and killed the gunman in a shootout.

Ray Rivera, a DJ at Pulse Orlando nightclub, is consoled by a friend, outside of the Orlando Police Department after a shooting involving multiple fatalities at the nightclub, Sunday, June 12, 2016. (Joe Burbank/Orlando Sentinel via AP) MAGS OUT; NO SALES; MANDATORY CREDIT Ray Rivera, a DJ at Pulse Orlando nightclub, is consoled by a friend on Sunday.(Joe Burbank/Orlando Sentinel via AP)

A pledge of loyalty to the Islamic State: The suspected gunman, identified as 29-year-old Omar Mateen, made a 911 call on Sunday identifying himself and declared allegiance to the leader of the Islamic State, according to U.S. law enforcement officials who asked spoke on the condition of anonymity discuss the ongoing investigation. Mateen, who was born in New York and whose family is from Afghanistan, also referenced the 2013 bombing of the Boston Marathon during that call. (The call was made during the attack, officials say.)

The FBI had looked into the gunman twice before: The FBI said Sunday that Mateen had been investigated on two different occasions by the bureau. In both cases, he was interviewed by agents. In 2013, he was investigated for “inflammatory comments … alleging possible ties to terrorists,” said Ron Hopper of the FBI. Mateen was investigated again the following year for possible connections to Moner Mohammad Abusalha, the first American to carry out a suicide attack in Syria. (Mateen and Abusalha had both lived in Fort Pierce, Fla.) The FBI ultimately was not able to substantiate the 2013 claims and deemed the relationship with Abusalha “minimal,” saying there was no threat.

The gunman used just two weapons, both bought legally: Orlando Police Chief John Mina said the gunman was armed with “a handgun and an AR-15-type assault rifle” and had additional rounds on him. “It appears he was organized and well-prepared,” Mina said. Mateen legally bought the two guns believed to be used in the attack within “the last few days,” Trevor Velinor of the Bureau of Alcohol, Tobacco, Firearms and Explosives said Sunday.

What we still don’t know about the rampage

What happened inside Pulse for three hours? The initial shots were fired after 2 a.m., and while the Orlando police quickly responded, they did not head inside to rescue hostages and confront the gunman for about three hours. What happened during that three-hour window? How did a lone gunman kill so many people inside a packed club and then hold dozens of others hostage? Police have not yet said. The situation inside transitioned from an active-shooter scene to a hostage situation, as Mina said Sunday, but how that unfolded has not been made clear.

How and when were all of the victims killed? Police opted to head inside in a rescue effort because they were worried about treating those injured and still inside, according to a senior U.S. law enforcement official. Once they went in, nearly a dozen Orlando police officers engaged in a shootout that ended with Mateen dead, one officer injured after a bullet hit his Kevlar helmet and a SWAT team rescuing about 30 people, Mina said. But police have not yet said whether any victims were injured or killed during this shootout, nor if all of the people shot were hit during the initial burst of gunfire at 2 a.m. or at another time.

Flowers on a temporary shrine is set up for victims of the shooting. (Mark Ralston/AFP/Getty Images)

The gunman’s motivations: While law enforcement officials say Mateen had pledged allegiance to the Islamic State during a 911 call with police Sunday, authorities have not said what they think inspired the attack. The investigation will determine whether this is seen as a hate crime or a terror attack, the FBI has said. The FBI has also said that while there is no indication of outside help or any other suspects in the Orlando shooting, they said this is part of the ongoing investigation.

Is this actually tied to the Islamic State? The group has called for lone wolves to carry out attacks, and it certainly took credit for the rampage on Sunday. The Islamic State-linked Amaq News Agency said in a message Sunday that the Orlando shooting “was carried out by an Islamic State fighter.” (The same news agency had released a message showing the Islamic State claiming some credit for the San Bernardino attack two days after that occurred, while Amaq posted a statement from the group asserting responsibility for the Brussels attacks in March within hours.) However, it was not immediately clear whether Mateen actually had any link to the group or whether they were previously aware of the attack.

The final toll: Unfortunately, with so many people wounded — in some cases suffering devastating injuries from multiple gunshots — it remains unclear whether the death toll will remain at 50 or if it will change.

Adam Goldman contributed to this report.

Further reading:

Here are the victims of the Orlando shooting rampage

Officials: Heavily armed man wanted to target Calif. gay pride event on Sunday

The suspected gunman’s ex-wife: “He beat me”

Orlando suspect’s father hosted a TV show and now pretends to be Afghanistan’s president