A gunman who killed dozens of people in a gay nightclub in Orlando, Florida, has been identified as Omar Mateen, a US citizen who had been known to the FBI since 2013.

Mateen opened fire inside Pulse nightclub in the early hours of Sunday in the deadliest shooting in modern US history.

FBI officials say the 29-year-old, who was killed by police, appeared to “Have leanings towards” radical Islamist ideology, although it was not clear whether the attack was a case of domestic or international terrorism.

The FBI investigation found no “Substantial relationship” between Mateen and Abu-Salha and the case was closed, said Special Agent Hopper.

Despite being on the FBI’s radar, Manteen, who worked as a security guard, was not on an official terrorism watch list and was able to legally hold a state firearms licence, according to Florida records.

Mateen was born in New York to Afghan parents but had moved to Fort Pierce, a city about two hours’ drive south of Orlando.

She told the newspaper that Mateen had not been very religious when she was with him and he had regularly exercised at the gym.

Police believe Mateen rented a car and drove to Orlando to carry out the attack on the nightclub, according to media reports.

The gunman had filed a petition for a name change in 2006 from Omar Mir Seddique to Omar Mir Seddique Mateen, according to US media.