EVER since he took charge of 65,000 NATO troops in Afghanistan in June last year, General Stanley McChrystal had acquired a reputation for straight talk about the war. He gave reporters free access to meetings in which the bleak progress of the drive against the Taliban was bluntly discussed. Frank and open-minded, genuinely interested in alternative views, the general happily took the press into his confidence.

In Dand, for example, a dusty region on the southern outskirts of Kandahar, he recently exhorted his troops, in front of this correspondent, to tell him what they thought was “wrong” with their effort to secure Afghanistan, whether they thought it was “doable”. He minced no words in telling them “what would cause us to lose.” And in a long interview, not short of self-criticism and uncertainty, he issued a daunting to-do list by the end of the year for southern Afghanistan, the Taliban's heartland. “I think I'll need to be able to say there's clear progress, and in some places irreversible progress, in the Helmand river valley and hopefully Kandahar,” he said. In other words: without convincing—and improbable—improvements in security in those areas, NATO's current efforts may be more or less over by Christmas.

Such candour was impressive, and an effective way of managing the press. But it blew back in General McChrystal's face this week, with the release of a profile of the general in Rolling Stone magazine that seemed to include every unguarded sentence he, or his aides, might have uttered. Asked about Joe Biden, an opponent of the surge in NATO troops now under way—with an extra 30,000 American troops being deployed to the south, including those in Dand—the general says: “Are you asking about Vice-President Joe Biden? Who's that?” Of similar opposition from America's ambassador in Kabul, Karl Eikenberry, to his review of NATO's operations, General McChrystal says: “Here's one that covers his flank for the history books. Now if we fail, they can say ‘I told you so'.”

None of this is exactly surprising. That Mr Obama's overcrowded team of senior advisers on Afghanistan have disagreed over what to do there—in the absence of any obvious good option—is well known. In particular, many senior Americans, and also Europeans and South Asians, share General McChrystal's aversion to the rootless office of Richard Holbrooke, America's AfPak special envoy: “Oh, not another e-mail from Holbrooke. I don't even want to open it,” the general groans.

Among their own, senior soldiers have always grumbled about their civilian masters. General McChrystal's blunder was to put too much trust in Rolling Stone. Yet the article appeared shortly after American casualties in Afghanistan had passed 1,000 and when even close aides to General McChrystal had been expressing grave pessimism about their prospects in the nine-year war. Its effect was devastating. After issuing his “sincerest apology” for the piece and offering to resign, General McChrystal was summoned to Washington to see an “angry” Mr Obama on June 23rd. He was sacked and replaced by General David Petraeus, chief of the US Central Command.

Shifts and successes

Politically, the general probably had to go: leaving him in place would have been seen as weakness. General Petraeus, America's most admired soldier, is also a formidable replacement, not least because of his greater clout in Washington. But in Afghanistan General McChrystal will be much missed. With support from Mr Obama, who inherited (and publicly embraced) a losing cause from his predecessor, General McChrystal first rewrote the campaign plan. The effect was to refine the haphazard counter-insurgency efforts of his predecessors, who include Mr Eikenberry: for example, by replacing a forlorn hope of controlling all Afghanistan with a serious bid to secure the densely populated reaches of the south.

This is still a daunting ambition. Kandahar and Helmand are the heartland of an insurgency that affects most of southern and eastern Afghanistan and an increasing portion of the north and west. A recent American survey of 120 insurgency-stricken districts (around a third of all districts) found that only a quarter of the population supported the government, and that over a third were sympathetic towards, or openly supported, the insurgents. To beat back the insurgency, the American troops now being deployed to the south will have to bring both security and a massive change of heart. This effort, concentrated in a summer offensive in Kandahar, is likely to determine the success of what is now General Petraeus's mission.

The coalition—a 46-nation mélange dominated by America, which will soon have 100,000 troops in Afghanistan—is meanwhile killing as many Taliban leaders as it can. American, British and other special-force soldiers are conducting over a dozen operations a night for this purpose—including one last month that accounted for Mullah Zergay, the Taliban “shadow” governor of Kandahar. This is part of a wider NATO effort to use violence more discriminately, in particular by limiting the aerial bombing that has killed hundreds of Afghan civilians. In the ten months to April NATO planes dropped 2,838 bombs, a 19% reduction on the previous ten months, despite an overall increase in fighting.

Atrocities persist, for which General McChrystal issued extraordinary apologies. He also started punishing the culprits: last month six American officers received career-blighting black marks over the killing of 23 civilians. In an escalating war, with insurgency-related violence up by 87% in the six months to March, NATO's losses are also climbing. On June 7th-8th, 12 soldiers were killed, including five Americans by a roadside bomb: the deadliest 24-hour period this year.

Change has been ordered from Washington, too. The cases of thousands of Afghan detainees have been reviewed, and over 200 released or handed over to Afghan custody. On the battlefield, American troops are also said to be making more conspicuous efforts to respect their enemies' rights. In a well publicised assault in February on Marja, a Taliban-administered segment of the fertile and crowded Helmand river valley west of Kandahar, American troops took pains to get enemy wounded to hospital. Aid workers in Afghanistan, who have long been scornful of American blundering there, are full of praise for these measures. One senior figure describes the McChrystal makeover as “a change in military culture”.

It has brought some overdue realism, too. NATO's main enemies, the Taliban and two other insurgent groups, both linked to al-Qaeda and led by former commanders of the anti-Soviet jihad, Gulbuddin Hekmatyar and Jalaluddin Haqqani, are based across the border in Pakistan—in the city of Quetta, in Baluchistan, and the rugged tribal areas. This makes them virtually unbeatable: no counter-insurgency has been won against enemies enjoying such a sanctuary. NATO's surge is therefore mostly designed to weaken the Taliban, the biggest group, sufficiently to allow the weak and corrupt government of President Hamid Karzai to start administering areas they now control.

To stand half a chance, governance will have to be vastly improved. A parallel army of foreign trainers and consultants has therefore been set to this task, in a simultaneous “civilian surge”. As the government consolidates and the insurgency cools, NATO fancies, many jobbing insurgents—or “$10-a-day Taliban”, as it calls them—will accept inducements to stop fighting. In fact, there is little evidence that this describes many of NATO's enemies, or that they will do any such thing. More reassuringly, Afghanistan's army and police force, which have been long neglected but are now being trained at express pace, will soon take the field in earnest. That, more or less, is the plan. And it had better start working soon. To placate domestic opponents of the war, chiefly within his own party, Mr Obama has promised to start withdrawing American troops from Afghanistan in July 2011.

Struggling in Helmand

No one familiar with the complacency and drift that has characterised NATO's efforts in Afghanistan can be unimpressed by this new sense of purpose. It represents the apogee of a decade of hard and often inglorious fighting by American troops, and a reorientation of the world's most formidable war machine. But will it be sufficient to avert defeat in Afghanistan? Probably not.

There is almost no chance that Afghanistan will be transformed by the time of Mr Obama's deadline. The insurgency is too robust. The government is too weak. Too much time has been lost. According to a senior NATO official, it takes on average 13 years to win a counter-insurgency campaign; and this campaign is, in effect, in year two. In fact, the campaign's mismanagement has done great damage: a congressional report on $2 billion of NATO contracts in Afghanistan, details of which were leaked this week, describes a hideous new mafia of politically connected warlords, enriched by contracts to protect the NATO convoys which some also allegedly attack.

If General McChrystal's plan is to be given a fair trial, the promised American withdrawal will therefore have to be remarkably gradual. Indeed, the expected withdrawal of 4,500 Dutch and Canadian troops over the next year will leave more gaps for Americans to fill. But Mr Obama, as General McChrystal noted, will be hard-pressed to sanction this unless there is a significant success for his plan. So far, not much is evident.

Bits of Helmand, where a vicious micro-conflict is fuelled by tribal rivalries and drug rackets, have been somewhat calmed since the arrival of 20,000 American troops last year to bail out 8,000 badly overstretched Brits. As evidence of progress in Lashkar Gah, the provincial capital, Britain's ambassador, William Patey, says that on a (thickly guarded) walk through the town's bazaar, two-thirds of the locals were prepared to shake his hand. Perhaps more telling is that one-third refused, in a province where nearly 300 British troops have lost their lives.

There is even less good news in nearby Marja. Before launching an airborne assault there in February, General McChrystal earmarked it as a testing-ground for his strategy. Once security was established there, he predicted, a “government-in-a-box” could be swiftly unpacked in the town, delighting its 60,000 inhabitants. But American forces in Marja are now under nightly attack, locals have been beheaded by the Taliban for co-operating with them, and there is little government in evidence. Given the town's recent history, the transformation was always unlikely. If in fact it reeked of desperation, the Taliban could smell it.

The men NATO needs, alas

This has put enormous pressure on NATO's plans for Kandahar, Afghanistan's second-biggest city and the former seat of Mullah Omar, the Taliban leader. It is a violent place. The militants are considered to have freedom to operate in four of its ten parishes. They control much of Panjwayi, Zhari and Arghandab, three neighbouring districts, and have a strong influence in Dand, between Kandahar and Quetta. In response to NATO's push, the insurgents have announced a fresh offensive of their own. The assassination of around 30 aid workers and officials in Kandahar in recent weeks may be a sign of this; pro-government local strongmen are also alleged to be involved. On June 9th a bomb-blast at a wedding-party in Arghandab killed 40 people, including many members of an American-raised local-defence militia. The district's American-befriended governor was murdered shortly afterwards.

Kandahar is mostly in government hands—but what hands they are. Ahmed Wali Karzai, the president's half-brother, is the city's main power-broker. He stands accused of running a mafia-style empire of illegal and legal businesses, backed by government and NATO patronage, enforced by violence, and including drug-trafficking, construction and private security. He denies these allegations, for which there appears to be no hard evidence. He is also alleged to have made millions of dollars from foreign contracts, some of them allegedly through a militia, Kandahar Strike Force, which works for the CIA. In 2009 its gunmen also murdered Kandahar's police chief. Rightly or not, many Kandaharis believe the main representative of the law in Kandahar is above it. At the least, the power and money that flows from Ahmed Wali to members of his small Popalzai tribe have exacerbated local jealousies.

Warlord-contractors

To improve security in and around Kandahar, NATO is now deploying an additional 10,000 American troops there, including those already in Dand. In Panjwayi and Zhari this will involve a battle—sometime after mid-September, when the leaves wither on the grape-vines where insurgents hide. With its slow progress in Marja in mind, however, NATO's main focus is on improving Kandahar's government. Even setting aside its alleged robber baron, this will be tough. The city's police are largely untrained and corrupt, only eight of 120 stipulated judges are doing their jobs, and mains electricity and water are, for many Kandaharis, a rare treat.

Even gauging what sort of progress Kandaharis want is not easy. Opinion polls in Afghanistan unsurprisingly point to Afghan unhappiness with insecurity, corruption and lack of economic opportunity. But nobody knows the degree to which these things drive them to the Taliban, or what sort of progress might win them to the government. Asked what NATO really understands about Afghan wants and fears, a senior adviser to General McChrystal says: “I think we know we don't know much, though it's not for lack of trying.” Random straw-polling of southern Afghans invariably shows little support for NATO's coming offensive—and a good deal of suspicion about what, after all these years, the foreigners are really up to in Afghanistan.

“Sometimes the foreign forces come to our village and sometimes the Taliban. It's a terrible situation. Both sides are creating problems for us and both suspect us,” says Muhammad Khan, one of four turbaned farmers of Zhari gathered in a guesthouse in Kandahar. Two houses of his, he claims, were destroyed by NATO bombing, and he has received none of the compensation he was promised. “If they really want to push the Taliban out of area, they can easily do so—after all, in 2001 they occupied the whole country,” he says of the Western forces. “We think they are not sincere, they don't want to beat the Taliban at all.” But in case they are sincere, Mr Karim offered this advice. “Corruption is why people are turning to the Taliban. If thousands of [NATO] operations are carried out it will make no difference so long as these corrupt officials are in place.”

Western officials have been bad-mouthing Ahmed Wali for years. This has merely annoyed Mr Karzai, for whom his half-brother allegedly did valuable vote-rigging service in last year's rotten presidential poll. With parliamentary elections due in September, Ahmed Wali remains a crucial placeman. NATO's best hope is therefore to sideline him, partly by starving him, and other parvenu warlords, of some of their fat contracts.

At a meeting in Kandahar to discuss the unwanted effects of NATO contracts, General McChrystal was informed that 570 of them, worth millions of dollars, had been issued from NATO's airbase in Kandahar, and nobody was quite sure to whom. The general consoled his aides: “We were in a hurry, we were ignorant, we created a business environment, and now it's come back to hurt us.” Yet it seems improbable that NATO, now in more of a hurry than ever, can fix this mess. Private security companies now play a big role in this war. They are estimated to employ around 50,000 gunmen. In Kandahar there are 23 unregistered security companies, not including militias working with American special-forces soldiers and the CIA. In the short term—on which NATO is being judged—cutting off the cash to these mobs would lead to yet more insecurity.

The abandoned turbine

In these circumstances, turning Kandahar round can seem less like a plan than an aspiration. And there is more than a whiff of unreality to NATO's chief development proposal: to splurge over $200m on three vast diesel generators. America's State Department has opposed the scheme, arguing that it would be unsustainable for a government that raises only $1.2 billion in taxes and tariffs. And a big hydropower plant at the nearby Kajaki dam should be able to light up Kandahar for a fraction of the cost. Alas, the turbine dispatched for this purpose, in an operation involving 5,000 British troops, still lies in the Kajaki dirt, the Taliban having made it impossible to truck in cement to install it. In approving the generator proposal, General McChrystal told his staff: “While I think Kajaki is critical for a long-term solution, there ain't no long-term if we don't win short-term.”

The situation is grim. To stand even a moderate chance of success, General McChrystal's counter-insurgency strategy would require more time than American and European governments are prepared to give it. Instead, NATO countries, perhaps including a reluctant America, are increasingly concluding that there will have to be a negotiated end to the war. But the Taliban are in no rush to talk. Their position is strong. Perhaps the best that can be hoped for NATO's current operations is to weaken the militants sufficiently to bring them to the table. That near-impossible task now falls to the impressive, persistent, but human General Petraeus.