The gun attack on a gay nightclub in Orlando, Florida, which claimed the lives of at least 50 people in the early hours of Sunday morning has been described by the US president as the deadliest mass shooting in American history.

The suspected gunman in what is the worst terror attack on US soil since the al-Qaeda attacks of September 11th, 2001, was named as Omar Seddique Mateen (29), a US citizen born in New York to Afghan parents who lived in Fort Pierce, about 120 miles southeast of Orlando, on Florida’s east coast.

US president Barack Obama called the attack on the Pulse nightclub “a horrific massacre” and “an act of terror and an act of hate.

“Today marks the most deadly shooting in American history,” Mr Obama said during a brief statement from the White House in which he again raised concerns about the ease of access to weapons in the United States.

“ The shooter was apparently armed with a handgun and a powerful assault rifle. This massacre 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 theater, or in a nightclub. 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,” he said.

The Orlando suspect called 911 before the attack and pledged allegiance to Islamic State, US law enforcement officials quoted by US media said.

He also referenced the brothers who carried out the 2013 Boston Marathon bombing, a Massachusetts State Police spokesman said.

“He pledged allegiance to Isis and referenced the Tsarnaev brothers,” state police spokesman David Procopio said in an e-mail. The Tsarnaev brothers Tamerlan and Dzhokhar killed three people and injured more than 260 in the April 15, 2013, attack.

The death toll eclipsed the 32 people killed by a lone gunman, student Seung-Hui Cho, at Virginia Tech university campus in April 2007. Another 53 people were injured in Sunday’s attack.

While investigators were still treating the attack as an act of terrorism, Mr Mateen’s family suggested that the attack by the married father of one may have been a hate crime aimed at the lesbian, gay, bisexual and transgender community.

The suspect’s father, Mir Seddique told NBC News that his son, who worked as a security guard, became enraged when he saw two men kissing in front of his wife and three-year-old son on a recent trip to Bayside, a popular entertainment area in downtown Miami.

“We are apologising for the whole incident,” Mr Seddique said. “We weren’t aware of any action he is taking. We are in shock like the whole country.” He added: “This had nothing to do with religion.”

US media reported that Mr Seddique had been investigated previously by the Federal Bureau of Investigation in 2014.

The attack on the nightclub, packed with about 300 patrons at the time in what is LGBT Pride month, began at 2.02am local time (7.02am in Ireland) on Sunday when a police officer working at the club exchanged fire with a gunman who then went inside and took hostages. About three hours later, a SWAT police team raided the club and exchanged gunfire with the suspect, who was holed up with hostages in a part of the club, killing him.

Inside, police found scores dead and injured. Dr Mike Cheatham, a trauma surgeon at Orlando Regional Medical Centre, where 46 of the injured were taken, said that most were in critical condition. “I think we will see the death told rise,” he told the Associated Press.

Orlando police chief John Mina said that the gunman used an assault rifle, an AR-17 semi-automatic with large capacity rounds of bullets that has become a signature of US mass shootings, and a handgun.

He also had “some type of device on him.” Police later carried out a controlled explosion on the device. “It appears he was organised and well-prepared,” Mr Mina told reporters.

The suspect’s ex-wife told the Washington Post that Mr Seddique was mentally unstable and violent towards her during a two-year marriage that ended in 2011.

“He was not a stable person,” said the woman, who did not want to be named. “He beat me. He would just come home and start beating me up because the laundry wasn’t finished or something like that.”

Relatives of club patrons caught up in the attacked recalled dramatic moments as they found themselves cornered by the suspected gunman. Mina Justice told the Associated Press that her son Eddie texted when the attack began and asked her to contact the police. He told her he ran into a bathroom with other club patrons to hide and then texted her: “He’s coming.”

“The next text said: ‘He has us and he’s in here with with us,’” she said. “That was the last conversation.” During the attack, the nightclub posted a message on Twitter: “Everyone get out of Pulse and keep running.”

The Irish embassy in Washington DC said it was monitoring developments but hadn’t received any requests for consular assistance.

Hillary Clinton, Democratic nominee for the White House, said she joined Americans in praying for the victims of the attack in Orlando, their families and the first responders who did everything they could to save lives.

“This was an actor of terror.... This was also an act of hate. The gunman attacked an LGBT nightclub during Pride Month. To the LGBT community: please know that you have millions of allies across our country. I am one of them. We will keep fighting for your right to live freely, openly and without fear. Hate has absolutely no place in America,” she said.

Her rival, Bernie Sanders, said all Americans were horrified, disgusted and saddened by the horrific atrocity in Orlando.

Republican presidential nominee Donald Trump said he was “right on radical Islamic terrorism” and called for toughness and vigilance.

Trump made the statement on Twitter after the attack in Orlando.

“Appreciate the congrats for being right on radical Islamic terrorism, I don’t want congrats, I want toughness & vigilance,” he tweeted. “We must be smart.”

President Michael D. Higgins said he wanted to express his sincerest condolences to the families of all those bereaved and affected by the tragedy.

In a statement on Sunday evening he said: “ Our thoughts are with the people of Florida and the community in Orlando and Orange County at this difficult time. The loss of innocent life on such a horrendous scale is truly shocking and challenges us all.”

It was the second deadly shooting at an Orlando night spot in as many nights. Late Friday, a man thought to be a deranged fan fatally shot singer Christina Grimmie, a former contestant on “The Voice”, as she was signing autographs after a concert.