Dozens of bodies were removed overnight from the scene of the deadliest mass shooting in modern American history.

Fifty people were killed and 53 injured in the attack on a gay nightclub in Orlando, Fla., in what President Barack Obama called an act of terror.

The gunman had previously been investigated by the FBI for links to terrorism. FBI Special Agent Ronald Hopper said Omar Mateen, 29, was first brought to the agency's attention in 2013 for making inflammatory comments to coworkers. In 2014, officials looked into ties between Mateen and an American suicide bomber, but found the contact was minimal and didn't constitute a threat.

Mateen, an American citizen and security guard from Fort Pierce, Fla., was killed in a shootout with police.

Officials confirmed Mateen called 911 on Sunday morning and said he supported the Islamic State militant group.

"It has been reported that Mateen made calls to 911 this morning in which he stated his allegiance to the leader of the Islamic State," said Hopper, the FBI's assistant special agent in charge on the case.

Sunday night, workers were removing bodies four at a time on stretchers out of the club and loaded them into white vans. The action was repeated over and over. The covered bodies were taken to the County Medical Examiner's office.

Omar Mateen opened fire inside the crowded gay dance club Pulse in Orlando, Fla., killing 49 people before dying in a gunfight with SWAT officers, police said. (Myspace/Associated Press)

The shooting at Pulse nightclub claimed more victims than any other by a single gunman in U.S. history. The previous most deadly shooting was the Virginia Tech killings, when 32 people were killed by a gunman in Blacksburg, Va., on April 16, 2007.

Mateen began shooting around 2 a.m. ET at the entrance to the club, which describes itself on Facebook and its website as a gay bar and said it was welcoming guests for Latin Night on Saturday.

An officer working at the club exchanged gunfire with the suspect, who then went inside with "an assault-type rifle and a handgun," Orlando police Chief John W. Mina said.

There were about 300 people in the club.

"He had an automatic rifle, so nobody stood a chance," said Jackie Smith, who saw two friends next to her get shot. "I just tried to get out of there."

Mateen exchanged gunfire with 14 police officers at the club, and took hostages at one point. Police sent in a SWAT team around 5 a.m.

Judy Rettig, right, and Karen Castelloes cry during a prayer vigil at Joy Metropolitan Community Church in Orlando on Sunday night. (Chris O'Meara/Associated Press)

In a statement released Sunday evening, Mina called the shooting "the darkest day" in his 25-year career with Orlando Police.

"Even before the first patrol units arrived on the scene, an OPD officer working extra duty at the club engaged the gunman as he opened fire," Mina wrote. "Our first responders and SWAT team faced a hail of gunfire as they rescued the hostages, and we are blessed beyond words that none of them were gravely injured or killed."

Orlando Mayor Buddy Dyer said 39 of the victims died at the club and 11 died at hospitals.

Dyer said at first officers mistakenly thought the gunman had strapped explosives to the dead victims and the club was booby-trapped, which delayed paramedics going in.

U.S. President Barack Obama, presidential hopefuls Hillary Clinton and Donald Trump have their own take on the mass shooting 2:53

The City of Orlando has started releasing the names of some of the victims. The first six people identified are Edward Sotomayor Jr., 34, Stanley Almodovar III, 23, Luis Omar Ocasio-Capo, 20, Juan Ramon Guerrero, 22, Eric Ivan Ortiz-Rivera, 36, and Peter O. Gonzalez-Cruz, 22.

After 8 p.m. on Sunday, officials started to remove bodies from the nightclub. Workers brought out four bodies on stretchers and loaded them into white vans. The action was repeated over and over.

The victims' remains were taken to the Orange County medical examiner's office.

President Obama said it was a "heartbreaking" day for LGBT communities and a reminder that any attack on Americans is an "attack on all of us."

Jackson Holman, left, hugs his partner Willie Perez during a vigil at Lake Eola Park in Orlando. (Steve Nesius/Reuters) Obama said the FBI is investigating the massacre as terrorism.

"What is clear is that he was a person filled with hatred," Obama said. "And over the coming days we will uncover why and how this happened."

Obama also used the press conference to talk about gun control.

"It is therefore 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 theatre or in a nightclub," he said. "And we have to decide if that's the kind of country we want to be and to actively do nothing is a decision as well."

Prime Minister Justin Trudeau released a statement Sunday afternoon.

"While authorities are still investigating and details continue to be confirmed, it is appalling that as many as 50 lives may have been lost to this domestic terror attack targeting the LGBTQ2 community," Trudeau said. "We grieve with our friends in the United States and Florida, and offer any assistance we can provide."

The Islamic State claimed responsibility for the shooting, but U.S. officials say there's no immediate evidence of a link to the terrorist group.

Meanwhile, Nihad Awad, the leader of the Council on American–Islamic Relations (CAIR), strongly condemned the massacre, saying it was a "hate crime" that wouldn't be tolerated.

Police forensics investigators survey the crime scene on Sunday. (Carlo Allegri/Reuters)

Presumptive Republican candidate Donald Trump reiterated his plan to ban Muslims from the U.S., and criticized Obama for not saying "radical Islam."

"I am trying to save lives and prevent the next terrorist attack. We can't afford to be politically correct anymore," Trump said.

Republican House Leader Paul Ryan released a statement about the shooting saying, "We are a nation at war with Islamist terrorists."

Presumptive Democratic nominee Hillary Clinton postponed an upcoming campaign rally in response to the massacre.

"To the LGBT community: please know that you have millions of allies across our country. I am one of them," Clinton said in a statement.