Orlando Police officers direct family members away from a multiple shooting at a nightclub in Orlando, Fla., Sunday, June 12, 2016. A gunman opened fire at a nightclub in central Florida, and multiple people have been wounded, police said Sunday. (AP Photo/Phelan M. Ebenhack)

In the deadliest mass shooting in American history, a lone gunman armed with an assault-type rifle and a handgun opened fire and killed 49 people at an Orlando nightclub early Sunday morning.

At least 53 were injured at the nightclub, Pulse, a gay venue that was wrapping up a “Latin Night” party as the shooter walked in minutes before 2 a.m.

The gunman, identified as 29-year-old Omar Mateen of Port St. Lucie, Florida, first exchanged gunfire with an officer working at the gay club then went back inside and took hostages, Police Chief John Mina said.

Around 5 a.m., authorities sent in a SWAT team to rescue the hostages.

In addition to the guns, the shooter also had some sort of "suspicious device," Mina said.

Survivors said the massacre started with three pops.

"At first, when I heard the shots I thought it was part of the music, but then we realized it was really happening,” Kenneth Melendez told the Orlando Sentinel. “I started running and saw someone bleeding from the arm and I was like wow this is really happening and I kept running."

He said that four of his friends were shot and were taken to the Orlando Regional medical Center. He told the Sentinel he went to Pulse often because it was a "safe environment where you could express yourself.”

A woman who was outside the dance club early Sunday was trying to contact her 30-year-old son, Eddie, who texted her when the shooting happened and asked her to call police. He told her he ran into a bathroom with other club patrons to hide. He then texted her: "He's coming."

"The next text said: 'He has us, and he's in here with us,'" Mina Justice said. "That was the last conversation."

Pulse posted on its own Facebook page around 2 a.m.: "Everyone get out of Pulse and keep running." Just before 6 a.m., the club posted an update: "As soon as we have any information, we will update everyone. Please keep everyone in your prayers as we work through this tragic event. Thank you for your thoughts and love."

Local, state and federal agencies were investigating.

President Barack Obama was briefed on the attack and asked for regular updates on the investigation, the White House said.

Authorities were looking into whether the attack was an act of domestic or international terror, and if the shooter acted alone, according to Danny Banks, an agent with the Florida Department of Law Enforcement.

"This is an incident, as I see it, that we certainly classify as domestic terror incident," Orange County Sheriff Jerry Demings said.

When asked if the gunman had a connection to radical Islamic terrorism, Hopper said authorities had "suggestions that individual has leanings towards that."

Authorities said they had secured the suspect's vehicle, a van, right outside the club.

According to USA Today, Pulse opened in 2004 by Barbara Poma and Ron Legler as "not just another gay club."

"It was important to create an atmosphere that embraced the gay lifestyle with décor,” the club's website says.

The attack follows the fatal shooting late Friday of 22-year-old singer Christina Grimmie, who was killed after her concert in Orlando by a 27-year-old Florida man who later killed himself. Grimmie was a YouTube sensation and former contestant on "The Voice."