Director of the FBI, James Comey. Thomson Reuters The director of the FBI, James Comey, said Monday that Omar Mateen, the man who carried out the worst shooting in US history at a gay nightclub in Orlando, mentioned links to al-Qaida, Hezbollah, and the Islamic State — all within a three-year span.

"We first became aware of him in 2013, while he was working as a security guard at a local courthouse," Comey told reporters Monday. "He made inflammatory and contradictory statements about terrorism that raised concern with his coworkers, and claimed family connections to al-Qaida."

He continued: "He then said he was a member of Hezbollah, which is a Shiite terrorist organization that is ideologically opposed to al-Qaida, a Sunni terrorist organization."

Law enforcement officials have identified the shooter as 29-year-old Mateen. Comey, declining to refer to Mateen by his name, said that the FBI's Miami office opened up a preliminary investigation into him in 2013 that lasted 10 months.

"We interviewed him twice, and he admitted to making statements about the terrorist organizations," Comey said. "But he said he did it in anger because he thought his coworkers were discriminating against him."

The FBI's second investigation into Mateen "came about in an indirect way" in 2014, Comey said. The FBI's Miami office was investigating a Florida man who had blown himself up on behalf of al-Qaida in Syria — an organization known as Jabhat al-Nusra. The office discovered he had attended the same mosque as Mateen, the Islamic Center of Fort Pierce.

A photo of Omar Mateen taken from his MySpace page. Screenshot/MySpace

The FBI had kept confidential sources connected to the killer and tracked him since opening the investigation in 2013. According to one source, Comey said, Mateen had mentioned the videos of the extremist Islamic preacher Anwar al-Awlaki, who was linked to al-Qaida.

But the source told the FBI that when Mateen later got married, had a child, and became employed, he was no longer concerned about his allusions to radical Islam.

Ultimately, the FBI determined that there were "no ties of any consequence" between Mateen and the suicide bomber, Moner Abusalha. On Sunday morning, however, Mateen called 911 during his rampage and told the dispatcher that Abusalha had partly inspired him to carry out the attack on Pulse nightclub.

Comey confirmed that the 911 call itself painted a bizarre picture of where Mateen's loyalties lay.

"During his call to 911, he said he was doing this for the leader of ISIL, who he claimed allegiance to," Comey said. "But he also mentioned the Boston Marathon bombers, who were inspired by al-Qaida, and Abusalha, who blew himself up for al-Nusra."

Comey noted that al-Nusra and ISIS are fighting each other in Syria.

"There is no indication he was part of a plot from outside the US, and no indication of what group he supported," Comey said, noting that he demonstrated a "general support for radical Islamist groups."

"There is confusion about his motives," Comey said.

Police forensic investigators work at the crime scene of a mass shooting at the Pulse gay night club in Orlando, Florida, U.S. June 12, 2016. REUTERS/Jim Young But Daveed Gartenstein-Ross, a counterterrorism analyst and senior fellow at the Foundation for Defense of Democracies, told Business Insider that it's not all that unusual for a jihadist at Mateen's level to have conflicting sympathies for different terror groups.

"ISIS, of course, was once part of the al-Qaida network," Gartenstein-Ross said. "When that was the case, there wasn't the distinction between ISIS and al-Qaida. If you go back a few years, they were not competitor organizations."

And considering that there's no evidence Mateen was in contact with ISIS leaders, he might have just been a low-level supporter of the group.

"On a foot-soldier level, you actually get less hostility toward other militant groups," Gartenstein-Ross said. "Foot soldiers are just less wrapped up in the competition."

Mateen's contradictory allegiances are "not only unsurprising, it's what you'd expect," he said.

Residents hold a Nusra Front flag during a demonstration calling for the implementation of the Islamic Sharia law, in Al-Sakhour neighborhood of Aleppo, Syria April 24, 2015. Hosam Katan/Reuters In a press conference Monday, Orlando police said they spoke with Mateen at least three times over the course of several hours on Sunday morning. Orlando Police Chief John Mina said Mateen appeared "cool and calm" during negotiations throughout the attack.

"He really wasn't asking for a whole lot. We were doing most of the asking," Mina said. "Our negotiators were talking with him, and there were no shots at that time, but there was talk about bomb vests and explosives. There was an allegiance to the Islamic State."

A witness who pretended to be dead in the Pulse nightclub bathroom and overheard Mateen's phone conversation with police before they stormed the club said Mateen demanded that the US "stop killing ISIS." Mateen presumably was referring to the US-led air campaign against ISIS targets in Syria and Iraq.

The ISIS-affiliated news agency Amaq News broadcast a claim of responsibility from ISIS for Mateen's rampage, shortly after the news broke that Mateen had pledged allegiance to ISIS in the 911 call.

The agency said the shooting was the work of "an ISIS fighter," multiple media outlets have reported. ISIS affiliates release another statement on an ISIS-linked radio station Monday morning claiming responsibility for the attack.

Police lock down Orange Avenue around Pulse nightclub. REUTERS/Kevin Kolczynski The overnight shooting at Pulse nightclub — a gay club in central Orlando — is the deadliest shooting in US history, with more fatalities than the mass shooting at Virginia Tech in 2007 (32 dead) and the mass shooting at Sandy Hook Elementary School in Newtown, Connecticut, in 2012 (27 dead).

Mateen, a US citizen, was born in New York in 1986 to two Afghan immigrants. An FBI representative said he "was organized and well prepared" for the attack, renting a car to drive from Fort Pierce to Orlando armed with an AR-15 and a handgun that he had legally purchased a few days prior.

Mateen was a security guard and had a Florida firearms license that allowed him to carry concealed weapons.