When the United States first invaded Afghanistan, the objective was clear and direct: defeat al Qaeda and oust the Taliban regime that had given the terrorist organization a safe haven from which to plan the 9-11 attacks. The mission has since become something very different–and utterly impractical. U.S. officials now stress the goal of supporting an indigenous political structure that will provide security to the Afghan people and implement good governance (apparently under the enlightened leadership of Hamid Karzai and his corrupt henchmen). Western military and civilian personnel are involved in everything from setting up schools to drilling wells to building roads. They may avoid using the term nation-building, but that is clearly what is taking place.

Afghanistan is an extremely unpromising candidate for such a mission, given its pervasive poverty, its fractured clan-based and tribal-based social structure, and its weak national identity. Furthermore, U.S. and NATO officials should be sobered by the disappointing outcomes of other recent nation-building ventures. The two most prominent missions, Bosnia and Iraq, ought to inoculate Americans against pursuing the same fool’s errand in Afghanistan.

The Dayton Accords ended the Bosnian civil war, but Bosnia is no closer to being a viable country than it was in 1995. It still lacks a meaningful sense of nationhood or even the basic political cohesion and ethnic reconciliation to be an effective state. If secession were allowed, the overwhelming majority of Bosnian Serbs would vote to detach their self-governing region (the Republika Srpska) from Bosnia and form an independent country or merge with Serbia. Most of the remaining Croats–who are already deserting the country in droves–would choose to secede and join with Croatia. Bosnian Muslims constitute the only faction wishing to maintain Bosnia in its current incarnation.

The economic situation is equally bad. Indeed, without the financial inputs from international aid agencies and the spending by the swarms of international bureaucrats in the country, there would scarcely be a functioning economy at all.

Although Bosnia is a nation-building fiasco, it eventually may be less of a disaster than Iraq. Americans who cheered the success of the surge strategy, and now swoon at the prospect of General Petraeus achieving a repeat performance in Afghanistan, were premature in their elation. Tensions are again simmering, both between Sunnis and Shiite Arabs and between Arabs and Kurds, and there have been numerous violent incidents. Months after national elections, the political squabbling is so bad that Iraqis have been unable to form a new government.

Moreover, Iraq has already ceased to be a unified state. Baghdad exercises no meaningful power in the Kurdish region in the north. Indeed, Iraqi Arabs who enter the territory are treated as foreigners–and not especially welcome foreigners. Although the Kurds have not proclaimed an independent country, the Kurdistan Regional Government rules a de facto state with its own flag, currency, and army.

None of this bodes well for Iraq’s national unity or even stability going forward. There are already calls by American pundits to abandon–or at least delay–plans for the withdrawal of the remaining U.S. combat forces, lest the country again erupt into chaos.

Despite a 15-year effort and the expenditure of billions of dollars, the Bosnian nation-building mission is a flop. Despite a seven-year effort (and counting), the expenditure of at least $800 billion, and the sacrifice of more than 4,300 American lives, the Iraq nation-building mission is, at best, a disappointment Yet, instead of learning from those experiences, U.S. leaders seem intent on pursuing the same chimera in Afghanistan.

Foreign policy, like domestic politics, is the art of the possible. Containing and weakening al Qaeda may be possible, but building Afghanistan into a modern, democratic country is not. The increasingly evident failures of nation-building in Bosnia and Iraq–both of which were more promising candidates than Afghanistan–should have taught us that lesson.