Updated

EDITOR'S NOTE: Orlando's mayor on Monday revised the death toll in the nightclub shooting to 49, from 50. The 50th body was identified as gunman Omar Mateen.

omar

Omar Mateen was identified as the gunman in the Orlando nightclub shooting. (Orlando Police)

A gunman who pledged allegiance to ISIS opened fire early Sunday morning in a packed Orlando nightclub, killing 50 people and wounding at least 53 more in the deadliest mass shooting in modern U.S. history.

ISIS claimed responsibility for the attack Sunday afternoon via its Amaq news agency, Reuters reported. Amaq said an "Islamic State fighter" carried out the assault. It was not clear, however, if the shooting was actually directed by the terror group or only inspired by it.

The attack in Orlando at Pulse, which bills itself as "the hottest gay bar" in the city and was packed with more than 300 people for "Latin Night," was reported minutes after 2 a.m. Sunday.

It ended hours later when police stormed the building and killed the shooter.

Dozens of partygoers remained hostage in the club for several hours after the initial shooting, prompting SWAT teams to rush inside. Shortly after 6 a.m. local time, Orlando police tweeted that the gunman had been killed. Authorities said there was not believed to be any further threat to the area.

"We know enough to say this was an act of terror and an act of hate," President Obama said in a speech from the White House on Sunday, cautioning that it was still early in the investigation.

House Intelligence Committee Ranking Member Rep. Adam Schiff said in a statement that the timing and location of the attack and information coming from local authorities indicated "an ISIS-inspired act of terrorism."

"The fact that this shooting took place during Ramadan and that ISIS leadership in Raqqa has been urging attacks during this time, that the target was an LGBT night club during Pride, and – if accurate – that according to local law enforcement the shooter declared his allegiance to ISIS, indicates an ISIS-inspired act of terrorism," Schiff said. "Whether this attack was also ISIS-directed, remains to be determined. I’m confident that we will know much more in the coming hours and days."

The gunman, Omar Mir Seddique Mateen, was heard shouting "Allah Akbar" while engaging officers, law enforcement sources told Fox News. Mateen also called 911 during the shooting to pledge allegiance to ISIS leader Abu Bakr al-Baghdadi, Fox News reported.

Mateen was interviewed three times by FBI agents -- twice in 2013, once in 2014 -- as part of two separate investigations, FBI Assistant Special Agent in Charge Ron Hopper said. However, both inquiries proved inconclusive and the cases were closed.

Mateen was not under surveillance or the subject of an active investigation at the time of the shooting, Hopper said.

The 2013 investigation was related to comments Mateen allegedly made to a co-worker "alleging possible terror ties." FBI agents were unable to "verify the substance" of his comments, Hopper said.

Mateen was also interviewed in 2014 due to his ties to an American man who later drove an explosive-laden truck into a restaurant in Syria for an Al Qaeda affiliate. Mateen and the suicide bomber, Monar abu Salha, attended the same mosque, however, the FBI determined their contact "was minimal," Chairman of the House Homeland Security Committee Mike
McCaul told Fox News.

Mateen was a U.S. citizen, Rep. Alan Grayson said during a Sunday morning news conference, though that was "not true of other family members of his." Mateen, 29, lived in Fort Pierce, Fla. He was born in New York to parents of Afghan origin and was a Muslim, Fox News confirmed.

Mateen was married in 2009 to a woman who was born in Uzbekistan, according to the couple's marriage license, but the two divorced in 2011.

"He was not a stable person," the ex-wife, who spoke on condition of anonymity, told The Washington Post. "He beat me. He would just come home and start beating me up because the laundry wasn’t finished or something like that."

A mortgage form from 2013 lists Noor Salman as his wife and Mateen also had a 3-year-old son. Mateen appears to have had no criminal record.

A licensed security officer, Mateen also had a statewide firearms license. He purchased two guns -- a handgun and a long gun -- legally during the week before the shooting, an ATF official said.

The FBI was scouring Mateen's cellphone and electronic devices on Sunday afternoon to identify any possible terrorist connections. This includes searching for any traces of propaganda, scrubbing of his web browsing history, and running down communications with individuals via social media and mobile messaging apps. 

As victims poured through their doors, Orlando Regional Medical Center officials called in six trauma surgeons, including a pediatric surgeon, Dr. Michael Cheatham said. Many of the wounded were "critically ill" due to their injuries, Cheatham said, and the hospital was trying to reach out to their families.

"I think we will see the death toll rise," Cheatham told The Associated Press.

Gov. Rick Scott declared a state of emergency in Orange County following the attack and asked for a moment of silence throughout the country at 6 p.m. on Sunday.

"This is an attack on our people," Scott tweeted around 11:40 a.m. "It's an attack on Orlando. It's an attack on FL. It's an attack on America. It's an attack on all of us."

Chief John Mina of the Orlando Police Department said officers were initially engaged in a gun battle outside the club before the suspect, armed with a handgun and "assault-type rifle," went back into the building, where more shots were fired. He said the gunman then took several hostages.

"It appears he was organized and well-prepared," Mina said.

Officials said Mateen had some communication with police during this standoff, though they did not reveal what was said.

Eleven officers were involved in raiding the nightclub, and one officer was injured, according to Banks. The injured officer was hit by a bullet and his Kevlar helmet saved his life, Banks said.

A hotline for victims' families was set up at 407-246-4357. Identities of victims were being released at cityoforlando.net/victims after family members had been notified.

Witnesses in the club reported mass chaos after hearing several shots ring out inside the nightclub.

Pulse posted on its own Facebook page around 2 a.m.: "Everyone get out of pulse and keep running."

It's owner later said in statement that she was "devastated by the horrific events that have taken place today.

Pulse, and the men and women who work there, have been my family for nearly 15 years. From the beginning, Pulse has served as a place of love and acceptance for the LGTQ community.  I want to express my profound sadness and condolences to all who have lost loved ones," Barbara Roma.

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."

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.

Fox News' Catherine Herridge, Chad Pergram and Matthew Dean and The Associated Press contributed to this report.