Forty-nine people are dead and 53 wounded after a shooting at Pulse nightclub early Sunday. It is the deadliest killing spree in United States history, authorities say.

The shooter was first identified by Congressman Alan Grayson as Omar Mateen, 29, from Fort Pierce.

FBI agent Ronald Hopper said Mateen pledged allegiance to the Islamic State in a 911 call just before the mass shooting, and the Islamic State has stated on Twitter that it takes credit for the shooting, but the investigation into this claim is still ongoing.

Hopper said Mateen had been investigated in 2013 for boasting to coworkers that he was connected to a terrorist organization and again in 2014 for possible ties to an American suicide bomber. The investigation conducted by the FBI found that “contact was minimal and did not constitute a substantive relationship or threat at that time.”

“Ultimately, we were unable to verify the substance of his comments and the investigation was closed,” Hopper said.

Florida Gov. Rick Scott declared a state of emergency for Orlando on Sunday, and President Barack Obama delivered a public statement Sunday at 1:30 p.m. decrying the shooting as “an act of terror.”

“Although it’s still early in the investigation, we know enough to say that this was an act of terror and an act of hate,” Obama said.

The president said that Homeland Security and the FBI are currently investigating any links Mateen might have with terrorist groups.

“We are still learning all the facts,” he said. “This is an open investigation. We’ve reached no definitive judgment on the precise motivations of the killer. The FBI is appropriately investigation this as an act of terrorism, and I have directed that we must spare no effort to determine what, if any, inspiration or association this killer may have had with terrorist groups.”

Gov. Scott asked for a moment of silence in the United States to be held at 6 p.m. Sunday.

“This is an act of terrorism. You just can’t imagine this happening in any community,” Scott said.

Orlando Mayor Buddy Dyer said the shooting was “the most difficult day in the history of Orlando.”

“Today, we’re dealing with something we never imagined and is unimaginable,” Dyer said. “Since the last update, we have gotten better access to the building. We have cleared the building, and it is with great sadness that I share that we have not 20, but 50 casualties.”

Police Chief John Mina said the tragedy began at 2:02 a.m., when three police officers engaged the suspect in a gun battle outside the club. A hostage situation then took place inside, and a SWAT team was called in, Mina said. Police received updates from patrons trapped in the club and decided to storm the club at about 5 a.m.

“Our biggest concern was further loss of life,” Mina said. “We exchanged gunfire with the suspect, and he was dead at the scene.”

One officer was injured, 103 civilians shot and 30 rescued from the club. Many of the injured were transferred to Orlando Regional Medical Center, which was placed on lockdown.

Mina said 11 Orlando Police officers exchanged gunfire with Mateen and have since been temporarily relieved of duty. The Florida Department of Law Enforcement is conducting an independent investigation into the shots fired by police officers. The names of the police officers who have been relieved of duty will be released over the next few days.

The suspect’s father, Seddique Mir Mateen, told NBC News on Sunday that he was “in shock,” but that his son had recently expressed anti-gay sentiments. He said the attack “had nothing to do with religion.” He said he’s not sure why his son would’ve fired on a group of people but that he had become angry a couple of months ago when he saw two men kissing on a Miami street.

Mateen’s wife, Noor Zahi Salman, told the FBI that she suspected her husband was planning an attack, according to NBC News.

Grayson said he believes the shooting had religious motive but that it’s too early in the investigation to tell.

“There’s blood everywhere,” he said. “I spoke with someone on the scene and there’s an enormous amount of evidence.”

Club patrons say this was not Mateen’s first visit to Pulse. Two Pulse regulars, Ty “Aries” Smith and Kevin West, saw Mateen at the club least a dozen times.

Mina said Mateen was armed with a pistol, an automatic rifle similar to an AR-15 and some sort of unidentified device. A representative of Bureau of Alcohol, Tobacco, Firearms and Explosives said that both weapons were bought legally within one week.

FBI Special Agent Ronald Hopper said the case was being investigated as a possible act of terrorism, either domestic or international.

Muhammad Musri, president of the Islamic Society of Central Florida, thanked law enforcement officials for their efforts and cautioned any rush to judgment.

“No one could have expected this, no one could have prepared for it, it could have happened anywhere,” a clearly shaken Musri said at a news conference. “It’s like lightning.”

He said the city and Muslim community “are heartbroken.”

Saturday night into Sunday, the club was celebrating Latin Night. Club patron Christopher Hansen told CNN he heard what could have been 20 or 30 shots, setting off a panic as people scrambled for cover or raced for the exits. He said he helped a couple people who were wounded.

“It’s just shocking,” said Hansen, who crawled to safety. “I just saw bodies going down.”

As the tragedy was unfolding, Pulse Orlando posted to its Facebook page, “Everyone get out of Pulse and keep running.”

Paul Valo, lead pastor for the Christ Church of Orlando, about two blocks from Pulse, said the church canceled services for the day to open its sanctuary for prayer and provide water and food for first responders.

Once street barricades have been cleared, the church plans to hold prayer services.

The UCF Police Department was among the agencies that responded to the shooting, said UCF spokeswoman Courtney Gilmartin. UCF’s Victim Services was at Orlando Regional Medical Center to attend to those who were hurt.

In a video statement, UCF President John Hitt expressed his condolences for the victims and their families today.

“I want everyone to know that our hearts go out to all of the victims and their families,” Hitt said. “It’s a terrible tragedy for all of Central Florida, and certainly for the university. I know that UCF Knights will want to be there to comfort and console and to assist. Again, our hearts and prayers go out to all of the victims and their families.”

“Today is a tragic day and we are making it clear anyone who attacks our LGBT community, anyone who attacks anyone will be gone after to the fullest extent of the law,” said Florida Attorney General Pam Bondi, who said she was bringing victims advocates from throughout the state of Florida here to Orlando.

The shooting spree came just one day after The Voice star Christina Grimmie was shot and killed after a concert Friday night at the Plaza Live Theater in Orlando. That gunman, identified as Kevin James Loibl, 27, of St. Petersburg, fatally shot himself after the attack.

“The FBI has specifically asked me to say to the people of Fort Pierce, St. Lucie and the Treasure Coast: If you know something, please come forward,” State Sen. Bill Nelson said. “The only way that we can put the dots together to find out the complete picture is for you to speak out.”

Orlando nightclub Pulse shooting: What we know

Three hours of terror

» 2:02 a.m. Shots ring out as a police officer working as a security guard engages in gun battle with assailant Omar Mateen, who was armed with an AR-15-style assault rifle, a handgun and an unidentified device.

» 2:06 a.m. Mina Justice was sound asleep when, she told the Associated Press, she got a text from her son, Eddie, from inside the club.

“Mommy I love you,” the message said. “In club they shooting.”

» 2:09 a.m. About seven minutes after the first shot, the Pulse Orlando nightclub’s Facebook page zapped out a chilling message: “Everyone get out of pulse and keep running.”

Law enforcement officials say there was “some communication” with assailant, but would not provide details. “Once the initial shots stopped we were dealing with a hostage situation,” Mina said in a press conference.

» 5 a.m. About three hours after the standoff began, Orlando police chief John Mina says the decision was made to storm the club and “rescue patrons (hiding) in a bathroom” and others still trapped inside the club in an effort to minimize loss of life. The police, Mina said, used a BearCat armored rescue vehicle to “get through a club wall.” Cops also set off a “controlled detonation” around this time to distract the assailant. After the BearCat rammed the club, the shooter opened the club’s door, according to Orlando Mayor Buddy Dyer, and that’s when cops took aim at the shooter.

» 5:53 a.m. About an hour later the Orlando police department confirm via Twitter that the assailant, Mateen, had been killed: “Pulse Shooting: The shooter inside the club is dead.”