ORLANDO, Fla. (AP) — A gunman wielding an assault-type rifle and a handgun took hostages and opened fire inside a crowded Florida nightclub, killing approximately 50 people and wounding 53 others before dying in a gunfight with SWAT officers, police said Sunday.

Police Chief John Mina also said the shooter had some sort of “suspicious device.” He said the suspect exchanged gunfire with an officer working at the club around 2 a.m., then went back inside and took hostages.

READ MORE: Garnet Valley Schools Superintendent Worries New Federal COVID-19 Testing Effort Could Disrupt Supplies

Around 5 a.m., authorities sent in a SWAT team to rescue the hostages, and the suspect then died in a gunfight with those officers. Mina said police have not determined an exact number of casualties, but that “approximately 20” people were dead inside the club.

FBI spokesman Danny Banks said during a news conference that the mass shooting is being investigated as an act of terrorism. He says authorities are looking into whether this was an act of domestic or international terror, and if the shooter was a lone wolf.

Police had said previously on Twitter that there was a “controlled explosion” at the scene of the shooting at Pulse Orlando. Mina said that noise was caused by a device intended to distract the shooter.

President Barack Obama decried the deadliest mass shooting in American history on Sunday as an “act of terror” and an “act of hate” targeting a place of “solidarity and empowerment” for gays and lesbians. He urged Americans to decide whether this is the kind of “country we want to be.”

Speaking hours after the shooting in Orlando, Obama said the FBI would investigate the shooting as terrorism but that the alleged shooter’s motivations were unclear. He said the U.S. “must spare no effort” to determine whether the suspect, identified by authorities as Omar Mateen, had any ties to extremist groups.

US President Barack Obama turns to leave after making a statement on the mass shooting at an Orlando, Florida nightclub in the White House Briefing Room in Washington, DC on June 12, 2016. Fifty people died and another 53 were injured when a gunman opened fire and seized hostages at a gay nightclub in Florida, police said Sunday, making it the worst mass shooting in US history. / AFP / YURI GRIPAS (Photo credit should read YURI GRIPAS/AFP/Getty Images)

US President Barack Obama turns to leave after making a statement on the mass shooting at an Orlando, Florida nightclub in the White House Briefing Room in Washington, DC on June 12, 2016.
Fifty people died and another 53 were injured when a gunman opened fire and seized hostages at a gay nightclub in Florida, police said Sunday, making it the worst mass shooting in US history. / AFP / YURI GRIPAS (Photo credit should read YURI GRIPAS/AFP/Getty Images)

“What is clear is he was a person filled with hatred,” Obama said of the alleged shooter.

Obama said this was “an especially heartbreaking day” for the lesbian, gay, bisexual and transgender community, and a sobering reminder that an attack on any American is an attack on all, regardless of their race, religion, ethnicity or sexual orientation.

“The shooter targeted a night club where people came together to be with friends to dance and to sing — to live,” Obama said. “The place where they were attacked is more than a night club. It was a place of solidarity and empowerment, where people have come together to raise awareness, to speak their minds and to advocate for their civil rights.”

Facebook Activates Safety Check For Orlando Nightclub Shooting

Mina Justice was outside the club early Sunday 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,'” she said. “That was the last conversation.”

READ MORE: Islanders Hand Flyers 8th Straight Loss

Dozens of police vehicles, including a SWAT team, swarmed the area around the club. At least two police pickup trucks were seen taking what appeared to be shooting victims to the Orlando Regional Medical Center.

Pulse Orlando 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.”

Police said local, state and federal agencies were investigating.

The incident 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.”

Jon Alamo said he was at the back of one of the club’s rooms when a man holding a weapon came into the front of the room.

“I heard 20, 40, 50 shots,” Alamo said. “The music stopped.”

Club-goer Rob Rick said it happened around, 2 a.m., just before closing time.

“Everybody was drinking their last sip,” he said.

He estimated more than 100 people were still inside when he heard shots, got on the ground and crawled toward a DJ booth. A bouncer knocked down a partition between the club area and an area in the back where only workers are allowed. People inside were able to then escape through the back of the club.

Overwhelming Blood Donation Response After Florida Nightclub Shooting

Christopher Hansen said he was in the VIP lounge when he started hearing gunshots. He continued to hear shooting even after he emerged, where police were telling people to back away from the club. He saw injured people being tended to across the street.

“I was thinking, are you kidding me? So I just dropped down. I just said please, please, please, I want to make it out,” he said. “And when I did, I saw people shot. I saw blood. You hope and pray you don’t get shot.”

MORE NEWS: 'This Turnout Is Amazing': Haddonfield Celebrates Martin Luther King Jr. Day

(Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)