Shadi Hamid unravels the complexities of the Orlando shooter.

Almost as quickly as the massacre of innocents in Orlando unfolded, Americans retreated to their ideological corners to interpret the motivations of the mass murderer, Omar Mateen.

Those on the right side of the spectrum saw an Islamic terrorist, motivated to kill by his religious belief. The ideological left has been more likely to understand Mateen as a deeply troubled man — likely mentally ill — who was driven to murder by rage and self-loathing because of his own conflicted sexuality.

But Shadi Hamid, a Brookings scholar and author of the new book Islamic Exceptionalism: How the Struggle Over Islam is Reshaping the World, told me he is uncomfortable with how those on the left have been minimizing the role of religion in the attack.

“On the left there is an unwillingness to take religion seriously as a prime motivator,” said Hamid, a self-described liberal and a Muslim American. Rather than obsessing over whether President Obama says the phrase “radical Islam,” Hamid says the “bigger issue with Obama is that he can’t seem to take religion seriously. He’s a self-styled technocrat. … He sees himself as rational … so it makes it difficult for him to understand aspects of Middle East politics where ideology and religion play a very important role in everyday life.”

But as NPR reported Saturday, the “precursors usually associated with radicalization” such as increased religiosity, a change in dress, or a changing relationship with family were lacking with Mateen. This does seem to make him more mass shooter than Islamic terrorist, especially because he had no clear ties to the Islamic State terrorist group, also known as ISIL or ISIS.

Hamid sees it differently: “You don’t have to ask permission (from ISIS). You can act as a lone wolf. You don’t have to be directed by ISIS to be inspired. Mateen is not formally a member of ISIS in the way we normally think of membership. But he did pledge allegiance. So for that reason alone, religion did play a factor.”

Some on the left have argued that Mateen couldn’t be a religious Muslim if he was frequenting gay nightclubs, but Hamid says this is a fundamental misunderstanding. “You can’t separate (his alleged homosexuality) from religious motivation because why would he be tortured by his sexuality?” Hamid asks. “It could be because he felt guilty and felt shame because of his at least vaguely religious upbringing. He was someone where religion did play a role in his life.”

Others are dubious that ISIL would want to be associated with someone who might have been gay. Hamid says this view is wrong. “The so-called sinfulness of extremists in the West has not been an issue for (jihad organizations),” according to Hamid. “A person could have been ‘sinful’ (in ISIL’s eyes) and sought redemption through violence. This is an important motivation with extremist groups.”

Moreover, “religious observance is not necessarily a good proxy for religious motivations in terrorist attacks,” says Hamid. “You could not be religiously observant and that doesn’t mean you weren’t motivated by religion.” Yet, this remains a key data point the FBI focuses on in determining whether a person is being radicalized.

But liberals aren’t completely off-base in recognizing the complexity of the situation. While religion was a factor with Mateen, Hamid posits that we don’t know whether it was the primary factor. “What is so scary about this new era is any kind of young, angry Muslim who has other issues, who wants to murder, can now invest his act with greater meaning by issuing a pledge of allegiance to ISIS,” Hamid noted. “That’s why ISIS is so dangerous.”