In an interview with The New York Times on Friday, Mr. Obama made the case that the United States cannot be Iraq’s air force, and that the Iraqi government cannot expect to have American forces come to its rescue. That only relieves the pressure on the Shi’ite-dominated government of Prime Minister Nuri Kamal al-Maliki to foster cooperation with Sunni Muslims and Kurds, the president said.

But Mr. McCain, one of the president’s sharpest foreign-policy critics, argued that such principles do not counter the real threat posed by the militants. He said Mr. Obama was setting up straw men when he suggested that anyone opposing his approach to Iraq was trying to restart the ground war there.

Mr. McCain said he would favor sending combat air controllers into Iraq to help identify targets for airstrikes. Heavy military equipment should be rushed into Erbil, the Kurdish capital, the senator said. And he said he believed the airstrikes must extend into ISIS-controlled territory in Syria.