WASHINGTON — FOR the last two years, many people in the foreign policy community, myself included, have argued repeatedly for the use of force in Syria — to no avail. We have been pilloried as warmongers and targeted, by none other than President Obama, as people who do not understand that force is not the solution to every question. A wiser course, he argued at West Point, is to use force only in defense of America’s vital interests.

Suddenly, however, in the space of a week, the administration has begun considering the use of force in Iraq, including drones, against the Islamic State in Iraq and Syria, or ISIS, which has been occupying city after city and moving ever closer to Baghdad.

The sudden turn of events leaves people like me scratching our heads. Why is the threat of ISIS in Iraq a sufficiently vital interest, but not the rise of ISIS in Syria — and a hideous civil war that has dismembered Syria itself and destabilized Lebanon, Jordan and now Iraq?

I suspect White House officials would advance three reasons.

First, they would say, the fighters in Iraq include members of Al Qaeda. But that ignores recent history. Experts have predicted for over a year that unless we acted in Syria, ISIS would establish an Islamic state in eastern Syria and western Iraq, exactly what we are watching. So why not take them on directly in Syria, where their demise would strengthen the moderate opposition?

Because, the White House might say, of the second reason, the Iraqi government is asking for help. That makes the use of force legitimate under international law, whereas in Syria the same government that started the killing, deliberately fanned the flames of civil war, and will not allow humanitarian aid to starving and mortally ill civilians, objects to the use of force against it.

But here the law sets the interests of the Iraqi government against those of its people. It allows us to help a government that has repeatedly violated power-sharing agreements in ways that have driven Sunni support for ISIS. And from a strategic point of view, it is a government that is deeply in Iran’s pocket — to the extent, as Fareed Zakaria reported in his Washington Post column last week, that Prime Minister Nuri Kamal al-Maliki would not agree to a residual American force because the Iranians forbade it.

The third reason the White House would give is that America fought a decade-long war in Iraq, at a terrible cost. We overturned a stable, strong but brutal government, although far less brutal than President Bashar al-Assad’s has proved to be, and left a weak and unstable government. We cannot allow our soldiers to have fought in vain, the argument goes, so we should now prop up the government we left in place.

This is where the White House is most blind. It sees the world on two planes: the humanitarian world of individual suffering, where no matter how heart-rending the pictures and how horrific the crimes, American vital interests are not engaged because it is just people; and the strategic world of government interests, where what matters is the chess game of one leader against another, and stopping both state and nonstate actors who are able to harm the United States.

In fact, the two planes are inextricably linked. When a government begins to massacre its own citizens, with chemical weapons, barrel bombs and starvation, as Syria’s continues to do, it must be stopped. If it is not stopped, violence, displacement and fanaticism will flourish.

Deciding that the Syrian government, as bad as it is, was still better than the alternative of ISIS profoundly missed the point. As long as we allow the Syrian government to continue perpetrating the worst campaign of crimes against humanity since Rwanda, support for ISIS will continue. As long as we choose Prime Minister Maliki over the interests of his citizens, all his citizens, his government can never be safe.

President Obama should be asking the same question in Iraq and Syria. What course of action will be best, in the short and the long term, for the Iraqi and Syrian people? What course of action will be most likely to stop the violence and misery they experience on a daily basis? What course of action will give them the best chance of peace, prosperity and a decent government?

The answer to those questions may well involve the use of force on a limited but immediate basis, in both countries. Enough force to remind all parties that we can, from the air, see and retaliate against not only Al Qaeda members, whom our drones track for months, but also any individuals guilty of mass atrocities and crimes against humanity. Enough force to compel governments and rebels alike to the negotiating table. And enough force to create a breathing space in which decent leaders can begin to consolidate power.

On the legal side, we should act in both countries because we face a threat to global peace and security, precisely the situation the United Nations Security Council was established to address. If nations like Russia and China block action for their own narrow interests, we should act multilaterally, as we did in Kosovo, and then seek the Council’s approval after the fact. The United Nations Charter was created for peace among the people of the world, not as an instrument of state power.

This is not merely a humanitarian calculation. It is a strategic calculation. One that, if the president had been prepared to make it two years ago, could have stopped the carnage spreading today in Syria and in Iraq.