The 29-year-old man responsible for the deaths of at least 50 people and wounded another 53 at an Orlando nightclub may have pledged allegiance to the Islamic State group in a call to 911 emergency service before the worst mass shooting attack in US history.

The gunman, who law enforcement officials identified as 29-year-old Omaar Mateen, entered the Pulse Nightclub in Orlando early Sunday morning and opened fire on patrons.

Ron Hopper, the FBI agent overseeing the agency's Tampa field division, told reporters that Mateen made a call to 911 early Sunday morning that was "general to the islamic State," but said he hadn't heard the tape and couldn't confirm that Mateen had pledged allegiance to the militant group in the call.

Hopper said that the FBI had interviewed Mateen at least three times in the past five years due to suspected terrorist connections, but he was not under surveillance or investigation at the time. He also said Mateen had legally purchased at least two of the weapons used in the attack in the past week.

After reports of Mateen's pledge of allegiance, the Islamic State's official Amaq news agency said that Mateen was an "Islamic State fighter" and that the group was responsible for the shooting.

"The armed attack that targeted a gay night club in the city of Orlando in the American state of Florida which left over 100 people dead or injured was carried out by an Islamic State fighter," the message said.

Amaq news agency claims Orlando attacker was affiliated with the Islamic State — Loveday Morris (@LovedayM)June 12, 2016

It's not clear Islamic State was aware of the attack or supported Mateen, or if Mateen was a lone wolf who mounted the attack with no assistance, which Islamic State then claimed.

Mateen entered the Pulse Nightclub in Orlando just after 2:00am and began shooting patrons using an AR-15 assault-style rifle and a handgun. He then took hostages and remained in a standoff with police unit they stormed the club at around 5:00am and killed him in a gun battle. Pulse was crowded with some 350 revelers at a Latin music night when the attack happened.

A lengthy exchange of gunfire could be heard from outside the club in one video posted on Twitter at 5:40am.

"At first we thought it was the DJ adding shots into the set-list...and when we realized it was something different people were just ducking and screaming," said Luis Burbano, a witness who told ABC News he was bartending at the Pulse Nightclub last night when the shooting started. "I dragged my best friend down and then slipping in, what was already, from drinks on the ground, to blood."

"The gunshots got closer... there was a break after 10 to 20 gunshots... and we started jetting up an exit towards the stage, and then the shooting started again, and they were getting louder."

"I heard at least 20 to 30 rounds by the time I got out," Burbano said.

Clubgoer Joshua McGill described in a posting on Facebook how he fled the attack.

"I hid under a car and found one of the victims that was shot," McGill said, describing trying to bandage the victim with his shirt and quietly dragging him to a nearby police officer. "Words cannot and will not describe the feeling of that. Being covered in blood. Trying to save a guy's life."

Other images on social media showed chaotic scenes as first responders treated wounded victims.

Walking to ORMC now. I'm ok. Friend got shot. I've never seen so much blood and mayhem or been so scared ever. — John PA (@lakecitymedman)June 12, 2016

No police officers were seriously injured in the raid on the club, but one was hit in the helmet with a bullet.

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

President Barack Obama said from the White House that the shooting was an act of "terror and hate," and represented an attack on all Americans.

"We are still learning all the facts, this is an open investigation" the president said. "I've reached no definitive judgment on the motivations of the killer. The FBI is investigating this as an act of terror."

Mateen was born in the US in 1986 to parents from Afghanistan, and lived in Port St. Lucie, Florida, about a two-hour drive from Orlando. The Orlando police department released this photo of him.

Suspect identified as Omar Mateen, 29. An American citizen born in New York. — Orlando Police (@OrlandoPolice)June 12, 2016

FBI Agent Hopper said Mateen was questioned twice in 2013 for comments he made at work about possible contacts with terrorists, and in 2014 for possible ties to an American suicde bomber.

"The FBI investigated and interviewed Mateen, and found contact was minimal and that he was not a threat at that time," Hopper said.

Accordion to Reuters News Agency, three US officials familiar with the investigation into the massacre said that no evidence had yet been found showing a direct link with Islamic State or any other militant group.

There is "no evidence yet that this was directed or connected to ISIS. So far as we know at this time, his first direct contact was a pledge of bayat (loyalty) he made during the massacre," said a US counter-terrorism official, referring to the 911 call the suspect made on Sunday. The official spoke on condition of anonymity.

A US intelligence official said it was not unexpected that Islamic State would claim responsibility given that the group has been suffering serious losses of fighters and territory in Iraq and Syria.

"The fact that a website connected to Daesh applauded it doesn't mean anything," said the U.S. intelligence official, using an Arabic language acronym for Islamic State. "They are losing on their home turf, and it's not surprising if they're looking for some kind of twisted victory."

The two officials familiar with the investigation told Reuters that a leading theory was that the suspect somehow was inspired by Islamist militants.

One official told the news agency that early information, the nature of which he did not disclose, indicated that the shooter was motivated by a mixture of "hate" and religion.

June is LGBT Pride Month, and coincides with the anniversary of both the Stonewall Riots and legalization of same-sex marriage in the US.

Vigils across the country were planned to mourn the victims Sunday night.

Follow VICE News on Twitter: @vicenews