By the end of 2011, almost all U.S. troops will have left Iraq, bound for home or for other American bases around the world. The military evacuation of Iraq constitutes a logistical feat. At the peak of the war 170,000 troops were in Iraq, operating out of 500 military bases, some the size of small cities. One Pentagon official said that future soldiers will use Iraq as a case study in the massive transfer of personnel and material.

The Iraq war ends without a peace treaty or victory march. This misadventure has cost over $800 billion so far and taken the lives of more than 4,000 American soldiers and as many as 600,000 Iraqis. It represents a defeat for the neoconservative dream of bringing liberty and American dominance to the Middle East by a military invasion. Ironically, the war decreased American influence in the region and put Iran in a stronger position relative to its neighbors. Al-Qaeda is alive and well in Iraq, where it continues to be a menace, attacking and killing civilians, police officers and soldiers.

When running for office in 2008, President Obama accused his predecessor of taking his eye off the ball—the fight against al-Qaeda in Afghanistan—by focusing on regime change in Iraq. He argued that Iraq was a war of choice, Afghanistan a war of necessity.

But the case for a military presence in Afghanistan was already waning. The primary objective in Afghanistan—the dismantling of al-Qaeda networks there—has been largely accomplished.

What remains is a tribal conflict which, as Jonathan Steele points out in his book Ghosts of Afghanistan, preceded even the Soviet Union's occupation of the country in the 1980s. The Soviets and now the U.S. have tried to defuse tribal rivalries but have only perpetuated and reconfigured an ongoing civil war.

The American military's costly, decadelong presence in Afghan­istan hasn't resolved the underlying problems. It ranks 135 out of 135 countries on the United Nations Human Poverty index, and in 2010 Trans­parency International declared it the third most corrupt state in the world. Indeed, the U.S. presence has only made matters worse. It's time to declare that U.S. military objectives have been accomplished in Afghanistan and bring home those troops too.