A member loyal to the Islamic State waves a flag in Raqqa, Syria, in June 2014. (Reuters)

In the early hours of Sunday morning, Omar Mateen killed at least 49 people during an attack on the popular gay nightclub Pulse in Orlando. During the attack, Mateen placed a 911 call and told the operator that his actions were motivated by his hardcore Islamist beliefs. However, Mateen's comments about Islam suggested that while his viewpoints were no doubt extreme, they were also confused, perhaps even incoherent.

Speaking to reporters Monday, FBI Director James B. Comey said that during his 911 calls, Mateen said he was a supporter of the Islamic State, the extremist Sunni group also known as ISIS that controls a significant expanse of territory in Syria and Iraq. Media outlets linked to the Islamic State later claimed Mateen as their own, describing him as "one of the soldiers of the caliphate in America."

Mateen also mentioned the 2013 Boston bombing during his calls. That attack, which left three dead and more than 260 injured, was carried out by the Tsarnaev brothers. While the brothers were not found to be directly linked to a foreign group, they were partly motivated by a magazine published by al-Qaeda's affiliate in Yemen. (According to the Guardian, Mateen's admiration for the Tsarnaev brothers went back further. In 2013, Mateen is believed to have told the FBI that he knew the two bombers, though investigators later concluded that this relationship had been fabricated.)

FBI Director James B. Comey held a news conference at FBI Headquarters on the terror attacks in Orlando, Fla. (Reuters)

Comey said that during the calls, Mateen also mentioned Moner Mohammad Abusalha, a fellow Floridian who had traveled to Syria to fight with Jabhat al-Nusra, the al-Qaeda affiliate in Syria. Mateen had been investigated by the FBI for his contact with Abusalha in 2014, but the case was quickly closed. Abusalha returned to Syria, where he killed himself in a suicide attack.

Further confusing matters, Comey also revealed that in "inflammatory and contradictory" comments to co-workers in 2013, Mateen had claimed to be a member of Hezbollah, the Shiite militia based in Lebanon.

To be clear, these groups named by Mateen are not allies. The Islamic State and al-Qaeda both derive their theology from an extreme view of Sunni Islamism, but in practical terms the pair split in 2014, with the more established al-Qaeda publicly disavowing the actions of the more extreme Islamic State. Jabhat al-Nusra, al-Qaeda's affiliate in Syria, often fights the Islamic State in the Syrian conflict. Meanwhile, Hezbollah is a Shiite Islamist group. In Syria, it supports the government of Bashar al-Assad, effectively meaning it fights both the Islamic State and al-Qaeda.

Comey suggested Monday that Mateen may have not understood the distinctions among the groups. Relatives have given mixed reports about the level of Mateen's religiosity, with some suggesting he preferred working out to studying religion. He attended the Islamic Center of Fort Pierce, though he is said to have rarely spoken. His Afghan father has filmed videos that appeared to offer support for the Taliban, a fundamentalist movement that also opposes the Islamic State, though his messages also were sometimes incoherent.

A board member at the Islamic Center of Fort Pierce in Florida talks about Orlando shooter Omar Mateen's attendance and demeanor. (Lee Powell/The Washington Post)

Mateen certainly wouldn't be the first terrorist to cite Islam as justification for his actions while apparently being somewhat confused about the religion. In one especially notorious case, two British men who were found guilty of terrorism charges in 2014 ordered  “Islam for Dummies,” “The Koran for Dummies” and “Arabic for Dummies” from Amazon before they left for Syria.

More on WorldViews: