Authorities said that 49 people were killed and 53 were wounded after a gunman opened fire at a gay nightclub in Florida early Sunday.

The attack, which is being investigated as a possible terrorism incident, has become the deadliest shooting in U.S. history.

Here's what we know so far.

What happened?

The gunman, identified as 29-year-old Omar S. Mateen, a Florida resident and U.S. citizen, opened fire early Sunday at Pulse nightclub in Orlando, Florida, authorities said. About 350 revelers were there for Latin music night.

Mateen was armed with an AR-15-style assault rifle and a handgun, and he was carrying an unidentified "device," authorities in Florida said.

The attack developed into a hostage situation, authorities say. Three hours later, SWAT team officers used armored cars to storm the club. Law enforcement officials said that 11 officers exchanged gunfire with Mateen, who was shot dead.

Officials said that 49 victims were killed as well as the gunman and another 53 were injured in the mass attack, which has eclipsed the 2007 Virginia Tech massacre to become the most deadly shooting in the nation's history.

Dozens of terrified patrons, some of them hiding in restrooms, were rescued. One officer was injured when he was hit in his helmet while exchanging fire with the gunman, police said.

Who's the gunman?

Mateen was an American citizen born in New York. The Florida resident's parents are immigrants from Afghanistan, authorities said.

The imam of the mosque he attended for nearly 10 years said the gunman was soft-spoken and had few friends. But Mateen's ex-wife, who spoke to The Washington Post, said her former husband was violent and mentally ill, and that he beat her repeatedly while they were married.

Mateen had worked at security firm G4S as a security officer since 2007, the company confirmed. He carried a gun as part of his job.

He purchased a handgun and a long gun in the past week or so, the FBI said.

The FBI investigated the gunman in 2013

The agency first became aware of Mateen in 2013 after he allegedly made comments to his co-workers that suggested sympathy for militants. He was interviewed twice by the FBI in 2013 and again in 2014, but the agency's interviews were inconclusive, and the investigation was closed.

Mateen called 911 during the attack and made comments about supporting the militant Islamic State group, officials said.

"It has been reported that Mateen made calls to 911 this morning in which he stated his allegiance to the leader of the Islamic State," said Ronald Hopper, the FBI's assistant special agent in charge on the case.

Mateen also mentioned the Boston Marathon bombers during the call, which he made 20 minutes into the shootings, authorities said.

Islamic State claims responsibility for the attack

On Monday, Islamic State claimed responsibility for the shooting in an official broadcast on the group's Albayan Radio. During the broadcast, the group called Mateen a "crusader."

​Although the group claimed responsibility, this did not necessarily mean it directed the attack: there was nothing in the claim indicating coordination between Mateen and Islamic State before the rampage.

The gunman's father claims the attack was not motivated by religion

Mateen's father, Mir Seddique, told NBC News that the massacre was not related to religion.

He said his son turned angry when he saw two men kissing in Miami a couple of months ago.

Mateen's ex-wife says he had a violent temper

Mateen was emotionally and mentally disturbed with a violent temper, yet he aspired to be a police officer, his ex-wife Sitora Yusufiy said on Sunday.

Yusufiy also told reporters in a news conference aired on CNN that she was "rescued" by family members from her ex-husband after four months of a stormy marriage that ended in divorce.