Now in its eleventh year, the U.S. occupation of Afghanistan is reeling from crisis to crisis. The U.S. government has spent nearly $600 billion on the war, yet the Taliban insurgency is unbowed. Afghan National Security Forces, which the U.S. is training, hold their overlords in contempt. In a wave of “green-on-blue attacks,” Afghan soldiers have killed 51 American GIs so far this year. And the Afghan people continue to suffer extreme poverty, disproving claims about the successful reconstruction of the country.

This is now clearly Barack Obama’s war. It was a war that he promised, as a presidential candidate in 2008, to escalate–and he has followed through on that promise as president. The man who millions of people voted for because he appeared to be the antiwar choice in 2008 is now responsible for a failing occupation.

The Afghanistan war started, of course, during the George Bush presidency. The U.S. invaded and occupied Afghanistan in 2001 in the wake of al-Qaeda’s attack on September 11. The Bush administration hoped to achieve several goals with its so-called “war on terror.” It aimed to destroy al-Qaeda, topple the Taliban regime that ruled Afghanistan, and build a client state.

In the process, Bush and his neoconservative administration hoped to secure bases throughout Central Asia so that the U.S., and not Russia or China, could dictate the development of the Caspian Sea’s oil and natural gas reserves and the pipeline routes to carry them. Finally, Bush wanted use the Afghan War as a steppingstone to conduct a series of regime changes from Iraq to Iran and Syria and thereby secure complete U.S. dominion over the Middle East.

The Iraqi resistance following the 2003 invasion of Iraq exploded these imperial fantasies. Gen. William Odom’s verdict on Iraq was correct; it was the greatest strategic disaster in American history. Bush’s missteps in the country had jeopardized American power in the Middle East and undermined its ability to dominate the planet.

Barack Obama promised that he would end what he called the “war of choice” in Iraq and escalate what he called the “war of necessity” against al-Qaeda and the Taliban in Afghanistan.

After an extensive strategy review in 2009, Obama opted to imitate Bush’s surge in Iraq with one of his own in Afghanistan. He adopted Gen. David Petraeus’ celebrated counter-insurgency strategy designed to drive out the rebels, embed U.S. troops among the occupied population, and thereby win over hearts and minds. In the event, Obama added 33,000 troops to the 68,000 American and 40,000 NATO troops already in the country.

But he did not implement counterinsurgency consistently. Instead, the strategy was combined with a “counterterrorist” strategy of night raids and drone aircraft strikes to kill Taliban and al-Qaeda operatives.

For this to work, Obama needed Pakistan to cooperate in clamping down on their Taliban allies along the border with Afghanistan. Sensing that Pakistan might not go along with American strategy, Obama launched a massive drone campaign against targets in Pakistan.

At the same time, Obama promised a campaign of nation-building in Afghanistan. He pledged a “civilian surge” of experts to aid Afghanistan in developing the economy and improving conditions for the country’s desperately poor peasant majority, especially its women.

Based on hoped-for military and economic successes, the administration planned to bolster the Afghan client state under President Hamid Karzai. After that, Obama promised, the additional surge troops would be pulled out in 2012 and the rest of the combat troops by 2014.

By every measure, Obama failed to secure Washington’s imperial goals for Afghanistan. And now, despite completing the pullout of 33,000 surge troops, the U.S. is facing a second strategic disaster in its “war on terror.” In an establishment critique of Obama’s surge for the Carnegie Endowment for International Peace, researcher Gilles Dorronsoro concludes, “In the end, the withdrawal is the result of a failed strategy, and the coalition is leaving behind a situation that in some respects is worse than it was before 2001.”

What went wrong?

Despite all the hype, Petraeus’ counterinsurgency strategy proved to be a miserable failure in Afghanistan. Recognizing that the influx of troops would overwhelm and outgun them, Taliban fighters relinquished many of their village strongholds and resorted to a classic guerilla war strategy. They staged hit-and-run attacks on the U.S. bases, deployed improvised explosive devices to target patrolling U.S. convoys, and threatened or killed Afghans who collaborated with the U.S. forces.

As a result, instead of “pacifying” Afghanistan over the last three years, counterinsurgency has led to an enormous spike in violence and death, with the largest number of victims being Afghan civilians. As analysts David Cortwright and Kristin Wall, for example, documented in a report published by Notre Dame University:

[T]he total number of record civilian deaths in 2011 was the highest yet at 3,021, an increase of 8 percent from 2010 and a 25 percent increase since 2009. Deaths cause [sic] by the Taliban increased by 14 percent to 2,332. It was the fifth consecutive year of increased civilian deaths.

Unsurprisingly, U.S. casualties have also dramatically increased. As the New York Times reports, “Nearly nine years passed before American forces reached their first 1,000 dead in the war. The second 1,000 came just 27 months later, a testament to the intensity of fighting prompted by President Obama’s decision to send 33,000 additional troops to Afghanistan.”

The U.S. has been unable either to crush the Taliban or compel it into talks on Washington’s terms. The Taliban maintained its strongholds in Pakistan’s border areas, conserved its underground infrastructure in Afghanistan’s south, and, in fact, expanded its presence in the north and east where it did not confront surge troops.

Realizing that counterinsurgency was not working, the Obama administration has increasingly turned to the “counterterrorism strategy.”

The U.S. has launched a massive campaign of night raids to seize suspected militants and drone strikes to kill opponents in both Afghanistan and Pakistan. As civilian casualties mounted, the U.S. forces ended up killing rather than winning over hearts and minds.

The night raids completely alienated the Afghan population. Based on unreliable intelligence, U.S. forces often invaded the houses of innocent civilians, killing those inside or detaining them for longer or shorter periods in the U.S. prison at Bagram Air Base, the Abu Ghraib of Afghanistan.

The counterterrorism offensive inevitably led to abuses and atrocities. Some–like Sgt. Robert Bale’s massacre of 17 women and children, or revelations of soldiers burning Korans at Bagram or urinating on dead Taliban fighters after firefights–have made the headlines. But there are scores more such abuses endured by Afghan civilians on a daily basis that go unreported.

The campaign of drone strikes has similarly killed untold numbers of civilians. For example, in September, a drone attack supposedly targeting insurgents in Afghanistan’s Laghman Province killed eight women who were performing the highly subversive act of collecting firewood.

No one knows for certain the number of civilian casualties, but they are certainly higher than the Obama administration admits. Left-wing journalist Gareth Porter reports that the administration had a policy since 2009 of “automatically considering any military-age male killed in a drone strike as a ‘militant’ unless intelligence proves otherwise.” Based on two major new studies that re-examine casualties from drone strikes, Porter estimates that as many as 74 percent of the dead were innocent civilians.

As Dorronsoro argues:

Counterterrorism operations are a source–probably the most important source–of anti-American sentiment in the region. Whatever the real level of civilian losses incurred during the operations, the general perception is clearly one of indiscriminate strikes against the population. This is important because this sentiment facilitates recruitment of jihadist movements, and to a certain extent paralyzes the Pakistani government.”

The Pew Center found that after three years of relentless drone strikes, 74 percent of Pakistanis now consider the U.S. to be an enemy nation. The Pakistani state has used public opposition to the U.S. to avoid cracking down on the Taliban, which it sees as its ally in a struggle against regional rival India. Thus, despite the surge, the Taliban still retain an estimated 50,000 loyal fighters prepared to fight in Afghanistan.

The surge was supposed to clear space for a massive development program and a so-called “civilian surge” of experts to help reconstruct the ravaged country. In his scathing new book about the surge, Little America: The War Within the War for Afghanistan, Washington Post journalist Rajiv Chandrasekaran shows that Obama’s reconstruction program has been a disaster, leaving Afghanistan little better off today than it was under the Taliban.

First of all, the civilian and military personnel who oversaw much of the so-called development imposed projects from above that made little sense for Afghan conditions. Their primary goal was to get Afghan farmers to shift from poppy cultivation, which supplied over 90 percent of the world’s opium, to some other kind of crop. This goal has failed completely–a product of Washington’s ignorance and neoliberal bias against state involvement in the economy.

In one absurd example, Chandrasekaran describes one disastrous attempt to get farmers to replace poppies with watermelons and other perishable crops:

[A]ll those melons and vegetables that farmers were growing…had to be transported to markets before they spoiled. But most farmers didn’t own trucks. They had to rent or borrow tractors and carts–any were available–and then they had to hope that on the rutted dirt roads from their farms to the bazaars, their melons didn’t turn into juice.

The U.S. Agency for International Development (AID) ruled out cotton, a far more logical crop for Afghanistan, because the country’s main cotton gin facility received state subsidies and Afghan cotton would supposedly compete with America’s.

With agricultural projects failing, USAID and the military still had to find a solution to rural unemployment in Taliban strongholds. Very often out of desperation, unemployed men join the Taliban as mercenaries, fighting for money against the occupation. To dry up that well, the U.S. simply hired the unemployed to do day labor.

But that solution sucked labor away from other vital development projects. At one point, Chandrasekaran reports, teachers quit their jobs to become day laborers because it paid better. As a result, newly constructed schools sat empty while teachers worked on labor gangs. All of this day labor was temporary, so the positions are coming to an end–and it did nothing to stimulate self-reproducing development.

The much-celebrated infrastructure projects like road construction ended up becoming sops for American multinational and security contractors. As Chandrasekaran reports, “Security, management and overhead costs had grown to almost 70 percent of the value of most contracts by late 2010. That meant only 30 cents on the dollar was going to help Afghans.”

As a result, conditions for Afghans have improved only marginally at best. As one aid worker, Ian Pounds, documents:

Ten years after a plethora of powerful, wealthy nations took positions here, Afghanistan has the fifth-lowest life expectancy in the world, reported at 48.6 years, and is one of only five countries in the world where a woman’s life expectancy is lower than a man’s. Only 23 percent of the population has regular access to drinking water. Only 24 percent of Afghans above the age of 15 are literate, with much lower rates among women. One in three refugees worldwide are Afghan, totaling over 3 million. Internally, there are 1.3 million refugees. Opium production in Afghanistan has steadily increased, now standing at 92 percent of world supply. Eighteen months ago, Afghanistan still ranked as second poorest nation in the world. The UNDP’s human poverty index ranked Afghanistan at the bottom. 9 million Afghans, or 36 percent of the population live in absolute poverty, with the next 37 percent living slightly above poverty line.

Despite claims by Bush and Obama–and, shamefully, the human rights organization Amnesty International–the occupation has in no way liberated women. All the propaganda in the world cannot disguise the reality that women suffer oppression, now compounded by the horrors of the occupation and the U.S.-installed puppet government.

The lone bright spot has been education. The occupation has helped establish 9,000 new schools since 2001. But as Anna Bakhen reports in In These Times:

Although the number of Afghan girls enrolled in school rose from 5,000 to 2.4 million, the schools are frequently attacked, a fifth of the girls who are enrolled never attend classes, and most of the rest drop out after fourth grade, either because there is no middle school nearby or because their parents tell them to.

In almost every other category, women’s conditions have not improved at all. Health care for the majority of women, like the rest of the population, is abysmal. “Despite significant improvements,” Cortwright and Wall report, “the maternal mortality rate is still estimated as the second-worst in the world next to Sierra Leone, with the risk increasing in remote areas.”

Sexual violence against women has actually gotten worse since the U.S. invasion a decade ago. Cortwright and Wall say that 87.2 percent of women have been subject to violence “including forced marriage, honor crimes, rape, and sexual and physical abuse. It is estimated that 81 percent of all women in Afghanistan will experience domestic violence at some point in their lives.”

Far from protecting and enhancing the condition of women, Karzai’s government and the parliament are stuffed with misogynist warlords. The regime went so far as to pass a law that legalized marital rape.

The occupation troops made this awful situation even worse. As Cortwright and Wall show, American and NATO forces have “produced new forms of powerlessness for many Afghan women and girls, who have been widowed, displaced, trafficked and forced into marriage as a direct or indirect result of the conflict” between the occupiers and the Taliban insurgency.

A women’s group in the city of Kandahar summed up their experience for British researchers:

It is like the Taliban times for women now. We are in the same situation as then. We cannot come out of the house to earn extra money or get an education. The only difference is that our honor was safe then, but it is not now.

With the surge strategy failing on all fronts, the U.S. has increasingly taken to scapegoating its own client regime. While many of the Obama administration’s complaints about Karzai are completely correct, the U.S. is to blame for the regime’s faults. Washington constructed it and continues to sustain it.

The U.S. picked Karzai as a Pashtun figurehead to lead a regime built out of many of the warlords it had supported in a proxy war against the USSR occupation in the 1980s. These warlords discredited themselves in the civil war in the 1990s to such an extent that large sections of the Afghan population welcomed the Taliban regime when it came to power.

Karzai’s state is utterly corrupt. His warlord allies rule over people with brute force and run all sorts of illegal businesses, from the heroin industry to human trafficking. To many, the regime’s vile character was personified by Karzai’s own brother, Ahmed Wali Karzai, who, before he was killed, was widely known to be one of the country’s biggest drug kingpins.

Nevertheless, the U.S. supported the Karzai regime through the 2009 presidential election, which was widely viewed as rigged. As Chandrasekaran argues, the U.S. occupation faced an impossible task in “trying to persuade Pashtuns to cast their lot with Karzai’s government instead of the insurgency. The problem was that Karzai’s administration was often more rapacious and corrupt than the Taliban.”

The U.S. trusts its own puppet regime so little that it bypassed it and channeled its development assistance through U.S. multinationals, non-governmental organizations, and the United Nations, all of which have consumed the funds in their own corrupt and ineffective manners. This only served to further incapacitate the Afghan state.

The clearest failure of the American state-building operation has been its inability to construct reliable Afghan National Security Forces. The U.S. has already spent $50 billion to set them up and pays between $10 and $12 billion annually to maintain them. These sums are enormous in a country whose annual gross domestic product is only $20 billion.

The Afghan National Security Forces cannot stand on their own–they are utterly dependent for their existence on the U.S.

They are also completely ineffective. As TomDispatch associate editor Nick Turse writes, “Today, the Afghan National Security Forces officially number more than 343,000, but only 7 percent of its army units and 9 percent of its police units are rated at the highest level of effectiveness.” As Dorronsoro writes, “The Afghan National Army hardly ever leaves its barracks because of the prevalence of improvised explosives devices and limited air support, which will be even more limited in the future.”

The soldiers and police have no political commitment to serving the regime, save making money for themselves and enforcing the rule of the local warlords. According to Cortwright and Wall, “Police abuses include not only taking bribes, but also extrajudicial executions, torture and the arbitrary arrest of unarmed civilians in village where the presence of Taliban fighters is suspected.”

Even though they are completely dependent on the U.S., members of the Afghan National Security Forces resent the U.S. occupation. This sentiment underlies the wave of so-called “green-on-blue attacks” against U.S. soldiers. The U.S. admits that the Taliban was responsible for only 25 percent of attacks on U.S. forces–unaffiliated Afghan soldiers and police staged the majority of them.

In fact, the U.S. has grown so wary of the Afghan National Security Forces that it suspended training of local police, restricted joint patrols between them and U.S. forces to the battalion level, and assigned armed American soldiers–so-called Guardian Angels–with shoot-to-kill authorization to police any and all interaction between American and Afghan forces.

Finally, the Taliban has been able to infiltrate a significant portion of the forces to stage attacks, gather intelligence and prepare for their own coming surge. In a sign of their growing power, the Taliban staged what U.S. officials called “the single most destructive strike on Western materiel in the 11-year war” when a team of fighters broke into a U.S. camp, killed 2 Marines and destroyed eight Harrier jets worth over $200 million.

The surge has been a disaster for U.S. imperialism and a catastrophe for the Afghan majority. Obama and his reelection campaign are trumpeting the extrajudicial assassination of Osama bin Laden to deflect attention from this enormous setback for American imperialism in Afghanistan, the rest of Central Asia and globally.

The U.S. was forced to pull all its combat troops from Iraq. In Afghanistan, the remaining 68,000 U.S. troops are scheduled for withdrawal by the end of 2014. The U.S. has lost its base in Uzbekistan and looks like it may lose its base in Kyrgyzstan. Worried about losing control in the region, Obama has pledged to keep 20,000 trainers in Afghanistan to oversee the Afghan National Security Forces, maintain several bases and staff them with an unspecified number of Special Forces to carry out counterterrorist operations.

But the U.S. will be in a weakened position to counter the inevitable surge by the Taliban, especially in the insurgents’ traditional stronghold in the country’s south. The U.S. blew an opportunity to negotiate a settlement with the Taliban at the height of the surge when it would have been better able to dictate terms. But the Taliban never accepted the offers put forward because they knew that the U.S. would eventually withdraw. Now with the pullout in motion, they are even less interested in talks.

Taliban leaders sense their growing advantage in a potential new civil war in Afghanistan. As Dorronsoro writes:

While the Taliban gather momentum, in 2013 and 2014, the Afghan regime will confront three crises simultaneously: an economic crisis sparked by the drop in Western spending, an institutional crisis as the end of President Karzai’s term approaches, and security crisis as the Taliban are expected to launch an advance beginning in the summer of 2013.

The U.S. is not only losing its grip on Afghanistan, but the various regional powers that all have vested interests in any potential new civil war in Afghanistan. As Dorronsoro continues:

[T]he influence the United States has over the regional players is decreasing; Washington will have no leverage over Pakistan in the next two years because of the logistical necessities of the withdrawal and the unstable military situation in Afghanistan. This in turn will make Afghanistan a staging ground for fights between regional powers as it was in the 1990s. Today Iran, India and Pakistan sponsor competing Afghan political forces and heightened regional competition on Afghan soil is likely.

Obama’s “good war” has turned out to be very much a bad war–and the price has been paid by the Afghan people. They have already endured decades of a USSR occupation, a civil war and then the U.S. invasion and occupation. Now they face the prospect of yet another civil war fueled by the U.S. and other regional powers over the ashes of their country.

• This article first appeared at Socialist Worker.