The deadliest mass shooting in modern American history killed 49 people after a gunman attacked a gay dance club in Orlando, Florida.

Omar Mateen, of Port St. Lucie, Florida, shot his way into Pulse nightclub at 2 a.m. Sunday with an assault rifle, Orlando Police announced Sunday. Mateen reportedly took hostage several patrons who were hiding in a bathroom. A SWAT unit entered the club at 6 a.m. and killed Mateen in what was described by law enforcement as a sustained gun battle.

Photos: Scenes from The Mass Shooting at Orlando Nightclub

Mateen used an “AR-15-style assault rifle,” Orlando Police Chief John Mina said. The AR-15 has been the signature weapon of mass shooters in America, used by Adam Lanza to kill 26 at Sandy Hook and the San Bernardino terrorists to kill 14.

The attack is being investigated as an act of domestic terrorism. Rep. Adam Schiff, the top Democrat on the House Permanent Select Committee on Intelligence, told CNN that, according to Homeland Security and local law-enforcement officials, Mateen “made a pledge of allegiance” to the Islamic State terror group and had been “heard praying in a foreign language.” It is unclear if Mateen was praying audibly during the shooting, Schiff said. Pete Williams of NBC News reported that Mateen called a 911 emergency line and swore his allegiance to ISIS leader Abu Bakr al-Baghdadi before the massacre.

Mateen’s father, Mir Seddique, told NBC News the attack “has nothing to do with religion.” He went on to say his son got angry when he saw two men kissing in Miami a few months ago. “We are saying we are apologizing for the whole incident. We weren’t aware of any action he is taking. We are in shock like the whole country,” Seddique said.

According to accounts from the scene, the gunman traded gunfire with a police officer before entering Pulse at 2 a.m. Most of the estimated 320 people inside escaped, but an unknown number were taken hostage in a bathroom.

Orlando Mayor Buddy Dyer told CNN the death toll jumped from 20 to 50 as additional victims were found inside the club. Personnel could not go in immediately as explosives were suspected to have been hidden. According to Dyer, there were five to eight hostages in one room with the shooter and an additional 15 to 20 in a separate room at the time when police entered.

Mina Justice said her son Eddie was inside the club and texted her when the gunshots erupted, the Associated Press reported. Justice told his mom he and others ran into the bathroom to hide.

“He’s coming,” Justice texted, adding later: “He has us, and he’s in here with us.”

“That was the last conversation,” his mother said.

Pulse was founded in 2004 by Barbara Poma and her friend Ron Legler after Poma’s brother died of AIDS, according to USA Today. She wanted to help promote awareness about the LGBT community, and Pulse refers to itself as “not just another gay club.”

As soon as the shooting broke out, the club posted a status update to its Facebook page telling everyone to get out and “keep running.”

“As soon as we have any information we will update everyone,” the club posted on its Facebook page at 6 a.m. Sunday. “Please keep everyone in your prayers as we work through this tragic event. Thank you for your thoughts and love.”

Sunday morning’s massacre came barely 36 hours after a man shot and killed singer Christina Grimmie while she was signing autographs in Orlando. The killer, Kevin Loibl, was tackled by Grimmie’s brother and then killed himself.

President Obama addressed the nation later in the afternoon, seemingly defeated by having to make these speeches so many times. “We have to decide if that’s the country we want to be. To actively do nothing is a decision as well,” he said in a short address while emphasizing that an attack on the LGBT community is an attack on “all of us.”Read more coverage of the massacre at the Pulse nightclub