On Thursday, when talking about the terrorist atrocity in Orlando in that city, President Obama acknowledged that Omar Mateen’s spree and the San Bernardino murders in December stemmed from the same root. But that root isn’t ISIS or jihad. The root is “derangement.”

These were “carried out, it appears, not by external plotters, not by vast networks or sophisticated cells but deranged individuals warped by the hateful propaganda that they’d seen over the internet.”

The president could have placed Sunday’s attack in a different context — the context not only of San Bernardino but of the slaughter at the Bataclan club in Paris in November, and the Boston Marathon bombing in 2013, and the Fort Hood spree in 2009.

These are all the true precursors of Omar Mateen’s evil morning of slaughter — terrorist attacks in service of jihad, inspired by inciters and designers of jihadist violence.

But the president had a different villain in mind. His villain, the true object of his anger, was the political stalemate over guns. That is why he more precisely likened the Orlando atrocity to the killings at the elementary school in Newtown, Conn., and at the movie theater in Aurora, Colo.

Both of these mass shootings were the work of schizophrenic madmen, not determined fifth columnists. Indeed, to make the comparison to Adam Lanza of Newtown and James Holmes of Aurora all but explicit, Obama described Mateen not as a jihadist but as a “single deranged person.”

The president did so because he doesn’t want us to view Mateen as a volunteer in a war against the United States in which he served as a combatant against a cleverly chosen soft target. He wants us to view Mateen as another psychotic American with improper access to dangerous weaponry.

And one, moreover, whose reason for the attack was not to harm America as a whole but to act out his hatred against the LGBT community because of dangerous cultural messages he learned inside the United States.

This flies in the face of the phone calls Mateen made during the spree to 911 and to a local TV news producer, as well as the Facebook post he put up before he acted, all of which make it unambiguously clear he was acting in service of ISIS.

Indeed, the president all but dismissed Mateen’s reasons for action at the very moment he acknowledged the role of terror on Sunday morning. “Whatever the motivations of the killer,” the president said, the things we have to guard against are the sale of weapons and the hate in our hearts.