Since Sept. 11, 2001, we have spent hundreds of billions of dollars on the Iraq war. Forty-five hundred members of our armed forces have sacrificed their lives. Nearly 32,000 American troops have been wounded on the battlefield of Iraq. And yet this is the news that greeted America this spring: “Syria and Iraq Eager for Cooperation with Iran in Building Joint Gas Pipeline.”

Then there’s this nugget of news about post-Saddam Hussein Iraq: Iraq’s foreign minister said during a joint news conference with his Iranian counterpart that “the two sides plan to ink several agreements during the [Iranian vice president’s] visit to Baghdad on July 6.”

It must be asked: Did we sacrifice all of that precious American blood and treasure so that Iraq can join with anti-U.S. regimes in Syria and Iran to supply Arab states with Iran’s huge natural gas supplies? Iraq was liberated for that?

The question is relevant in the context of President Obama’s announcement Wednesday that he has decided to keep 68,000 U.S. troops in Afghanistan for at least the next two years. Yes, the president also said that he plans to remove 10,000 troops from Afghanistan by the end of this year and that a total of 33,000 troops will be brought home by next summer. But all this really means that Obama intends to reduce American troop levels only by the “surge” number that he announced at West Point in December 2009. The upshot is that there still will be tens of thousands of American boots on the ground policing the streets and patrolling the mountains of Afghanistan well into the future. And toward what end?

The question of endgame got muddled in Iraq. Today it is the question for Afghanistan, and there still is no clarity, at least not an answer that makes sense from the standpoint of U.S. national interests. Al-Qaeda is still dangerous, as Obama acknowledges. But more than half of its leadership has been taken out, and the other half is on the run. The Taliban has strongholds in Afghanistan, but it does not now, nor has it ever, a threat to U.S. soil. How does it serve U.S. interests to keep playing Sugar Daddy to a country that wants our money and guns but is too embarrassed to stand side by side with us in the daylight?

The president’s stated objective in Afghanistan is to strengthen the capacity of that country to fend for itself. But what does that really mean?

It certainly doesn’t include the defeat of the Afghan Taliban that provided the al-Qaeda network with a haven in Afghanistan. Au contraire. Obama spoke this week of reaching a political settlement in that land of war. “America will join initiatives that reconcile the Afghan people, including the Taliban,” he said. Clearly he envisions a future with the Taliban sharing power in that country.

Imagine that. More than $444 billion spent and over 1,500 American lives given in Afghanistan, all to make it possible for the corrupt regime of President Hamid Karzai to cut a deal with the brazenly ruthless Taliban. Toward what end? An Iraqi outcome, that’s what.

Expect at some point a Taliban-infused Afghanistan to follow the lead of the Iraqis and work out their own mutual economic agreements with U.S. foes in the region.

All those bonds we floated to pay for those wars. All those American men and women who, as Obama put it so eloquently, “will not live to enjoy the freedom that they defended.” All those lost limbs. All those broken bodies with wounded minds. All those losses, so that Iraq and Afghanistan can one day enjoy bountiful relations and have a lasting peace with nations that hate our guts.

Have we lost our minds?

kingc@washpost.com