Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

At least 50 people were killed and more than 50 others were wounded when a gunman opened fire and took hostages at a gay nightclub in Orlando, Florida, early Sunday morning.

The shooter, identified by several law enforcement sources as Omar Mateen, 29, was killed in a shootout with law enforcement after a three-hour siege.

The massacre — the worst mass shooting in the history of the United States — began when the gunman stormed the Pulse Nightclub about 2 a.m. ET with a handgun and a Sig Sauer MCX, an AR-15-style rifle, officials said.

Among the latest developments:

The gunman called 911 before the attack, expressing fealty to ISIS. He twice had been investigated by federally authorities for alleged comments he made about terrorism, but both investigations were closed.

The names of the first victims identified in the shooting include seven men between the ages of 20 and 36 years old.

Mateen had security and firearm licenses and the gunman's weapons were legally purchased within the past week.

President Barack Obama called the attack "an act of terror and hate."

Omar Mateen MySpace

The carnage ended about 5 a.m. ET, when 11 Orlando police officers and three Orange County sheriff's deputies stormed the nightclub and exchanged fire with Mateen, authorities said. City officials said about 300 people were in the club at the time of the shooting.

FBI evidence specialists arrived Sunday night at Mateen's home in a condominium that had been evacuated shortly after dawn, authorities told NBC News. They took their time in case Mateen's unit might be booby-trapped, but authorities said late Sunday that no devices were found, and residents were allowed back home about midnight.

Seddique Mir Mateen, Mateen's father, told NBC News that "this has nothing to do with religion" in spite of reports that his son had declared his allegiance to ISIS.

A law enforcement official told NBC News there is no indication that Omar Mateen was in touch with terrorists overseas and nothing to indicate this was a directed attack. Also, several officials say, there's no sign that anyone else was involved in the attack, either in helping Mateen or egging him on.

The father said his son got angry when he saw two men kissing in Miami a couple of months ago and thought that might be related to the shooting.

"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 Mir Mateen said.

Law enforcement sources told NBC News that Omar Mateen was born in New York in 1986 and was listed as living in Fort Pierce, about 125 miles south of Orlando on Florida's Atlantic coast. Mateen had active security officer and firearm licenses, according to Florida records, and his family said he worked in security.

The FBI first looked into Mateen in 2013 because of a statement he had made about radical Islamic propaganda, law enforcement officials told NBC News. Ron Hopper, an assistant FBI special agent in charge of Orlando operations, said the investigation began after Mateen made offensive comments to co-workers. He was interviewed twice, but the investigation was closed after the FBI wasn't able to confirm that he had ties to radical Islam, Hopper said.

The FBI interviewed him again in 2014 when it learned that he might have a connection to a U.S. suicide bomber, but the investigation was closed because the FBI determined that "contact was minimal and did not constitute a substantive relationship," Hopper said.

Law enforcement officials told NBC News that Mateen swore allegiance to the leader of ISIS in a 911 phone call shortly before the shooting, in which he also mentioned the Boston Marathon bombers, Dzhokhar Tsarnaev and Tamerlan Tsarnaev.

Mateen legally bought the two guns used in the shooting in the past week, said Trevor Velinor, an assistant special agent in charge of the U.S. Bureau of Alcohol, Tobacco, Firearms and Explosives in Tampa.

Marriage records show he was married in Port St. Lucie in 2009, and his family said he had a 3-year-old son.

Related: 'Absolute Devastation' Among LGBTQ Community

Police said that Mateen was a U.S. citizen but some of his family members aren't. They wouldn't say where those family members were from.

Meanwhile, a man who answered the phone at Mateen's address, Mustafa Abasin, told NBC News: "We are in shock, and we are sad." He wouldn't say how he knew Mateen, but he said he was helping investigators.

Rep. Alan Grayson, D-Florida, whose district includes the area of the massacre, said the attack was "more likely than not ideologically motivated."

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

"It's no coincidence that the attack took place where it did and when it did," Grayson said. "It might be that we've seen the commission of an awful hate crime."

Grayson said investigators were searching Mateen's home and combing the nightclub. Processing the gruesome scene would "take hours," Grayson said, adding: "There is blood everywhere."

The first victims were identified Sunday afternoon. Officials said more names would be released as family members of the dead were notified.

Many Muslim groups swiftly rebuked the attack Sunday.

"We condemn this monstrous attack and offer our heartfelt condolences to the families and loved ones of all those killed or injured," Rasha Mubarak, Orlando regional coordinator for the Council on American-Islamic Relations, said in a statement. "The Muslim community joins our fellow Americans in repudiating anyone or any group that would claim to justify or excuse such an appalling act of violence."

President Barack Obama said Sunday afternoon that the massacre is "a further reminder of how easy it is for someone to get their hands on a weapon that lets them shoot people in a school or in a house of worship or a movie theater or in a nightclub."

Pulse shooting: In hail of gunfire in which suspect was killed, OPD officer was hit. Kevlar helmet saved his life. pic.twitter.com/MAb0jGi7r4 — Orlando Police (@OrlandoPolice) June 12, 2016

"And we have to decide if that's the kind of country we want to be," Obama said. "And to actively do nothing is a decision, as well."

"This is an especially heartbreaking day for our friends fellow Americans who are lesbian, gay, bisexual or transgender," Obama said, calling the attack "an act of terror and an act of hate."

Obama said the FBI was leading the investigation.

Police initially said about 20 people were dead, but Orlando Police Chief John Mina said that once authorities were able to get into the club, many more victims were discovered. Mina called the attack "one of the worst tragedies we've seen."

PHOTOS: Orlando Nightclub Massacre

Mina said a uniformed officer working extra duty initially traded gunfire with the shooter, who officials say was armed with at least two firearms.

"The officer engaged in a gun battle with that suspect. The suspect at some point went back inside the club, and more shots were fired. This did turn into a hostage situation," Mina said.

Officials decided "to go in on a rescue" just after 5 a.m. Mina said, adding that an officer was injured after being shot in the head.

"It appears his helmet saved his life," he said. "So he has an injury to his eye, but it looks like the bullet did hit his helmet."

We are dealing with something we never imagined. 1/7 #PrayforOrlando — Mayor Buddy Dyer (@orlandomayor) June 12, 2016

Orange County Sheriff Jerry Demings said the incident "could definitely be classified as domestic terrorism."

Florida Gov. Rick Scott traveled to Orlando on Sunday morning and declared a state of emergency in the city.

"Our thoughts and prayers are with the victims, families and all those affected by this horrific tragedy. We are a strong and resilient state and we will devote every resource available to assist with the shooting in Orlando," Scott said in a statement.

Emergency services respond to the shooting Sunday morning at Pulse nightclub in Orlando, Florida. Univision Florida Central / EPA

Police also had previously reported on Twitter that there was a "controlled explosion" at the scene. Mina later clarified that the noise was caused by a device intended to distract the shooter. Several officials told NBC News that, despite earlier concerns, Mateen did not have any explosives with him. Some bomb-sniffing dogs had alerted earlier, but nothing was found.

Revelers described scenes of horror inside the club. One witness told MSNBC that they had to crawl over bodies to escape.

A post to the club's Facebook page about 2 a.m. warned "everyone get out of Pulse and keep running." Witness video from outside showed dozens of first responders at the scene and several victims on the ground.

"It was tragic," club-goer Christopher Hansen said. "I wasn't sure if it was the music, because ... it went with the beat almost until you heard just too many shots."

"It was just like bang, bang, bang, bang, bang, bang — and that's when you just know chaos is just — it was in turmoil," he added.

Mina Justice was outside the club 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 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 told The Associated Press. "That was the last conversation."

Witness Anthony Torres posted to Facebook that he and his friends made it out of the club "just barely as we started to hear fire being shot."

"They are just pulling people out in stretchers loading them up," he said, referring to first responders. "Omg please god let everyone make it."

"People are screaming that people are dead," Torres wrote in another post.

The shooting at the nightclub comes during a series of national celebrations that mark LGBT Pride Month.

Barbara Poma, the owner of Pulse, said in a statement Sunday that she was "devastated."

"Pulse, and the men and women who work there, have been my family for nearly 15 years," Poma said. "From the beginning, Pulse has served as a place of love and acceptance for the LGBTQ community. I want to express my profound sadness and condolences to all who have lost loved ones. Please know that my grief and heart are with you."