But by late spring of 2014, after isis took the northern-Iraq city of Mosul, he came to believe that U.S. intelligence had failed to appreciate the severity of the threat and the inadequacies of the Iraqi army, and his view shifted. After isis beheaded three American civilians in Syria, it became obvious to Obama that defeating the group was of more immediate urgency to the U.S. than overthrowing Bashar al-Assad.

Advisers recall that Obama would cite a pivotal moment in The Dark Knight, the 2008 Batman movie, to help explain not only how he understood the role of isis, but how he understood the larger ecosystem in which it grew. “There’s a scene in the beginning in which the gang leaders of Gotham are meeting,” the president would say. “These are men who had the city divided up. They were thugs, but there was a kind of order. Everyone had his turf. And then the Joker comes in and lights the whole city on fire. isil is the Joker. It has the capacity to set the whole region on fire. That’s why we have to fight it.”

The rise of the Islamic State deepened Obama’s conviction that the Middle East could not be fixed—not on his watch, and not for a generation to come.

On a rainy wednesday in mid-November, President Obama appeared on a stage at the Asia-Pacific Economic Cooperation (apec) summit in Manila with Jack Ma, the founder of the Chinese e-commerce company Alibaba, and a 31-year-old Filipina inventor named Aisa Mijeno. The ballroom was crowded with Asian CEOs, American business leaders, and government officials from across the region. Obama, who was greeted warmly, first delivered informal remarks from behind a podium, mainly about the threat of climate change.

Obama made no mention of the subject preoccupying much of the rest of the world—the isis attacks in Paris five days earlier, which had killed 130 people. Obama had arrived in Manila the day before from a G20 summit held in Antalya, Turkey. The Paris attacks had been a main topic of conversation in Antalya, where Obama held a particularly contentious press conference on the subject.

The traveling White House press corps was unrelenting: “Isn’t it time for your strategy to change?” one reporter asked. This was followed by “Could I ask you to address your critics who say that your reluctance to enter another Middle East war, and your preference of diplomacy over using the military, makes the United States weaker and emboldens our enemies?” And then came this imperishable question, from a CNN reporter: “If you’ll forgive the language—why can’t we take out these bastards?” Which was followed by “Do you think you really understand this enemy well enough to defeat them and to protect the homeland?”

As the questions unspooled, Obama became progressively more irritated. He described his isis strategy at length, but the only time he exhibited an emotion other than disdain was when he addressed an emerging controversy about America’s refugee policy. Republican governors and presidential candidates had suddenly taken to demanding that the United States block Syrian refugees from coming to America. Ted Cruz had proposed accepting only Christian Syrians. Chris Christie had said that all refugees, including “orphans under 5,” should be banned from entry until proper vetting procedures had been put in place.

This rhetoric appeared to frustrate Obama immensely. “When I hear folks say that, well, maybe we should just admit the Christians but not the Muslims; when I hear political leaders suggesting that there would be a religious test for which person who’s fleeing from a war-torn country is admitted,” Obama told the assembled reporters, “that’s not American. That’s not who we are. We don’t have religious tests to our compassion.”

(Continue…)