"As the result of two successful campaigns, of the employment of an enormous force, and of the expenditures of large sums of money," the secretary of state observed, "all that has yet been accomplished has been the disintegration of the State . . . and a condition of anarchy throughout the remainder of the country." A highly decorated general, recently returned from service in Kandahar, concluded, "I feel sure that I am right when I say that the less the Afghans see of us the less they will dislike us." The politician was Spencer Cavendish, Marquis of Hartington, the British secretary of state for India. The general was Sir Frederick Roberts, who eventually became a field marshal and the subject of three ballads by Rudyard Kipling. The year was 1880. As U.S. President Barack Obama tries to wind down the longest war in U.S. history, while leaving behind some measure of stability, he would be wise to keep in mind this bitter truth: most of Afghanistan's would-be conquerors make the same mistakes, and most eventually meet the same disastrous fate.

All serving consuls and prospective invaders interested in avoiding such an end would do well to read Peter Tomsen's magisterial new book, The Wars of Afghanistan. A career U.S. diplomat, Tomsen served as Washington's special envoy to the Afghan resistance in 1989-92, an experience that gave him almost unrivaled personal insight into Afghanistan's slide from anti-Soviet jihad into civil war. His account of the country's political dynamics before, during, and after this period is exhaustively researched, levelheaded, and persuasive. Throughout the book, he highlights two lessons that most of Afghanistan's invaders learn too late: no political system or ideology imposed by an outside power is likely to survive there, and any attempt to coax political change from within must be grounded in a deep knowledge of local culture and customs.

In Afghanistan, legitimate authority has traditionally been highly localized, a product of consensus rather than brute force, and firmly anchored in tribal, clannish, and kinship structures. Afghanistan only developed the barest bones of a centralized state in the twentieth century, and even today, Kabul's control over the country's periphery remains tenuous at best. These attributes make Afghanistan a difficult country for foreign military planners to occupy. Then again, as former U.S. Secretary of Defense Donald Rumsfeld, under whose tenure the United States began its operations in Afghanistan, might have put it, you go to war in the country you have, not the country you want.

Tomsen compellingly argues that these salient features of Afghan political life will not disappear anytime soon. His conclusions about how Washington might stabilize Afghanistan, given the country's decentralization and independent culture, range from the uncontestable (better understand local practices) to the slightly contestable (do not hope to centralize power) to the problematic (reinvent the U.S. relationship with Pakistan). Whether one agrees with Tomsen, however, there is no denying that his descriptions of Afghanistan's society and politics are a valuable foundation for any discussion of how the country should be governed.

DEJA VU ALL OVER AGAIN

Although the British and Soviet wars in Afghanistan may be the closest analogues to the United States' experience today, Tomsen starts his tale from the beginning. He usefully summarizes 3,000 years of Afghan history, during which the Greeks, the Romans, the White and the Black Huns, the Mongols, the Moguls, the Persians, and the Turkmens all tried to dominate the land. Every campaign eventually came to naught, either because the invader paid insufficient attention to local culture or because he sought to impose centralized control on ferociously independent tribes and clans. The pattern was basically the same each time: a brutally competent conqueror sweeps through Afghanistan, wreaking enough carnage to terrify all his enemies into submission, but he soon finds himself mired in a swamp of tribal customs and feuds that he does not begin to comprehend. When he loses enough in men and gold, he retreats -- not infrequently with fewer limbs than he had when he arrived.

Unlike previous invaders, the British troops that marched into Afghanistan in 1839 did not come to conquer; such a goal would have been far too expensive for the frugal bureaucrats back home. Instead, they aimed to place a puppet on the Afghan throne, or at least to establish a buffer between British India and the expanding tsarist Russia. The newly installed monarch would govern far more justly than his ousted rival: his British patronage was proof of his enlightenment. The British, much like the Soviets and the Americans decades later, were amazed to discover that Afghans did not believe in their benevolence. Suspicion quickly flared into insurgency, and when the British pulled out of Kabul in 1842 with a convoy of 16,000 troops and camp followers, only a single survivor (the assistant surgeon William Brydon) reached the border town of Jalalabad alive. Still, the lesson did not sink in. The British intervened in Afghanistan again in 1878 to compel the Afghan emir to at least accept a British diplomatic mission, and within just two years, they were left with some 3,000 dead or wounded. The Third Anglo-Afghan War, waged just after World War I to repel an ill-advised Afghan raid into British-held territory, lasted barely three months but killed 236 Britons in action. In each case, the colonial power arrived with increasingly modest goals -- and left with those goals only barely met.

At first, some Afghan city dwellers may have welcomed the Soviet invasion of 1979 as a respite from half a decade of coups and near coups, and those in the countryside may barely have known that it was happening. But any warm or neutral feelings were quickly swept away by the Soviets' attempts to impose their communist ideology and their conducting of a counterinsurgency campaign through carpet-bombing. By conservative estimates, more than one million Afghans were killed during the decadelong Soviet presence in the country -- many times the number of Afghans who have died as a result of the NATO-led war since 2001.

Tomsen, a Russian speaker who served as a political counselor in the U.S. embassy in Moscow immediately prior to the Soviet invasion, makes clear that there is no moral equivalence between the Soviets' occupation of Afghanistan in the 1980s and the ongoing U.S.-led campaign there. He points out, however, that the Soviets made the same core mistakes that have haunted invaders before and since them: they attempted to impose a centralized order on a highly decentralized nation, and they displayed complete ignorance about the realities of Afghan society. There were few nations in the 1970s less ripe for a Marxist-Leninist revolution than Afghanistan. The country had no proletariat; indeed, it had little capitalist structure of any kind.

Yet even as communism failed to catch on, Moscow refused to jettison its ideological framework and instead tried to shore up its puppet government by patching together the two rival factions of the ruling national communist party. The Khalq faction was overwhelmingly made up of members of the Ghilzai Pashtun tribes, and the other, the Parcham faction, was mostly made up of Tajiks and Durrani Pashtuns, the Ghilzais' traditional foes. The feud between the two groups was coated with a thin veneer of socialist rhetoric, but it was really only a continuation of centuries-old tribal struggles. The result was a government in Kabul wholly uninterested in governance, utterly removed from the day-to-day concerns of the Afghan people, and consumed with petty struggles over the spoils of rule. Meanwhile, the government simultaneously parroted and plotted against its foreign patron. If this doesn't sound familiar, it should.

THE ENEMY WITHIN

To a specialized reader, the most valuable parts of Tomsen's book are those in which he recounts what he actually witnessed. His recitation of the political maneuvering of the Soviet era in Afghanistan may strike some as overly detailed: the Ghilzai warlord Gulbuddin Hekmatyar betrays the Tajik warlord Burhanuddin Rabbani, Rabbani betrays the Uzbek warlord Abdul Rashid Dostum, Dostum betrays everyone, and so on. But it is precisely with such detail that Tomsen breaks the most new ground. For this reason alone, The Wars of Afghanistan should have a place among the indispensable books on the topic.

The general reader will also find much to ponder in Tomsen's firsthand accounts. It is here that Tomsen most fully articulates his criticisms of the United States' own Afghanistan strategy, which he sees as having been remarkably static over the last few decades. Of the Clinton administration, he writes that the White House seemed not to have had any policy at all, "only a strategy that [was] marginally adjusted in reaction to events." (The critique also applies, in varying degrees, to every modern U.S. administration before and since.) As the United States' war in Afghanistan went from cold to hot, Washington made the same mistakes again and again.

According to Tomsen, another recurrent problem has been the United States' incoherent implementation of its policy, with every White House failing to enforce unified action across all branches of the government. Tomsen describes the CIA, in particular, as having conducted a foreign policy of its own, sabotaging U.S. attempts to build a unified moderate Afghan front and instead channeling support to Pakistan-based extremists. Meanwhile, U.S. presidents have been unwilling to devote sufficient time, attention, and political capital to formulating an effective Afghanistan policy. Most damaging of all, Tomsen argues, the United States has essentially outsourced its strategy to Pakistan's intelligence agency, the Inter-Services Intelligence (ISI), funneling billions of dollars and military equipment to rabidly anti-American military officers and their jihadist proxies. The result, he argues, is that the United States has been continuously hoodwinked as Pakistan has taken the money for nothing in return.

U.S. President Ronald Reagan, for example, praised the anti-Soviet mujahideen as "the moral equivalent" of George Washington and looked the other way as the ISI funneled most of the American money and arms to Hekmatyar and other incompetent, anti-American figures while sidelining more capable and more broadly representative ones, such as the resistance leader Ahmad Shah Massoud. Tomsen is kinder to George H. W. Bush, who appointed him as special envoy to the region, than to other U.S. presidents, but he writes that he himself lacked the bureaucratic support to rein in the CIA when it undermined agreed-on policies, such as supporting the development of a moderate and broad-based government. During Bush's tenure, Tomsen writes, the agency continued to call all the shots, and money kept flowing to the ISI. Clinton made a few diplomatic feints, such as limited outreach to the ISI-backed Taliban, and lobbed a few cruise missiles when the Taliban continued to shelter al Qaeda, but he otherwise largely ignored Afghanistan. And even after 9/11, George W. Bush failed to wrest power from the CIA, the Pentagon, and the ISI. Tomsen sees traces of promise in Obama's 2009 decision to renew top-level emphasis on Afghanistan, but he is skeptical that such a commitment will work without a wholesale reexamination of U.S. policy. In sum, Tomsen sees most outside potentates, whether politiburo chairmen or presidents, as making the same set of errors.

UNCOMMON COMMON SENSE?

Trying to learn from the mistakes of their predecessors, today's war planners have settled on a comprehensive counterinsurgency strategy that is supposed to create enough security to help a civilian government establish legitimacy among the local populace. Observers with longer memories will recall, of course, that the principles of counterinsurgency have been discovered many times before: by the British in Malaya, the French in Algeria, the United States in Vietnam and the Philippines, and even the Soviets in Afghanistan. And discovering (or rediscovering) a principle is easier than implementing it. Ten years into the current counterinsurgency in Afghanistan, the military piece of the mission seems to have progressed far more rapidly than the civilian portion. Troops have pacified the major cities enough to allow for the formation of a central government. But the government of President Hamid Karzai seems to have little more popular support than did that of the Soviet puppet (and eventual light-post adornment) Muhammad Najibullah. As General Stanley McChrystal, then commander of U.S. forces in Afghanistan, candidly noted in his 2009 assessment of U.S. progress in Afghanistan, the military piece of counterinsurgency can do little more than provide the time and space for a civilian government to take root. It remains to be seen whether in 2014, by which time U.S. troops will have withdrawn from their combat role in Afghanistan, the Afghan government will resemble a stable oak or a flimsy reed.

Tomsen's policy recommendations are the flip side of his critique. He calls on the Obama administration to ensure a coherent policy by relegating the U.S. military and intelligence agencies to "policy-implementing, not policymaking." He also urges the administration to stay engaged in Afghanistan for the long haul but to "de-Americanize the Afghan war across the board as rapidly as possible" by disentangling the United States from Afghan governance and development, finding Afghan moderates worth backing, and helping the Afghan regime build its governance capacity so long as its practices are "honest and effective." If some of Tomsen's recommendations are common sense (who could object to greater policy coherence?), others are somewhat contradictory (how should one stay engaged enough to back moderates and build the regime's capacity, all while shifting responsibility for security to Afghan forces?). The government in Kabul may not inspire much confidence today, but Tomsen avoids the question of what the United States should do if Afghan politics are as corrupt and dysfunctional in 2014 as they are in 2011.

Tomsen also urges a get-tough approach with Pakistan: "The most valuable contribution that America can make to Afghan peace," he writes, "lies not in Afghanistan but in Pakistan." In addition to enforcing existing conditions on military aid more strictly, Tomsen argues, Obama should threaten to designate the country a state sponsor of terrorism if the ISI does not cut its ties to militants. Some readers will wholeheartedly endorse Tomsen's call, even if following it might lead to a severing of relations between the United States and Pakistan. Others will question the wisdom of trading a potential disaster in Afghanistan (a country of 40 million people and of dubious strategic interest to the United States) for a potential disaster in Pakistan (a nation of 185 million and with the world's fifth-largest nuclear arsenal). Even those who share Tomsen's intense frustration may scratch their heads trying to figure out what leverage the United States could possibly hold over the Pakistani military as long as the Pentagon remains so logistically dependent on it: half the supplies for U.S. troops in Afghanistan (and almost all the lethal equipment, from ammunition to the weapons that fire it) are transported daily by the convoys that come through the Khyber Pass and Spin Boldak, a town right on the border with Pakistan.

And even those who agree with the basic elements of Tomsen's approach will remain hungry for a fallback option if his approach fails. "Afghanistan is an unpredictable place," Tomsen writes. "Things almost never turn out as planned, especially when the planning is done by foreigners." How should U.S. policy deal with this problem? If the Afghan National Security Forces are unable to provide security by 2014, should the United States delay the withdrawal of its troops indefinitely? If the Karzai regime fails to address corruption and poor governance, should the United States continue to give it money? And if Pakistan continues to be "fireman and arsonist," which Tomsen says it has been consistently over the past three decades, should the United States disengage from it completely and accept the consequences? As bad as things are now, they could easily get much worse.

Inevitably, any book with the breadth of The Wars of Afghanistan will have a few nits for the picking, but there are two reasons to read Tomsen's book carefully. First, it is extremely well written; an entire career spent drafting State Department cables miraculously failed to grind down the author's narrative spirit. Second, and more important, Tomsen has often been right in the past -- even, or especially, when many others were wrong.

Before 9/11, for example, he was in favor of cooperating with the two moderate mujahideen leaders Massoud and Abdul Haq when the U.S. government was against doing so. He was against working with the decidedly nonmoderate Hekmatyar and Hamid Gul, the ISI head who helped create several of the worst terrorist groups still operating in the region today, when Washington was for it. He was also right to sound the alarm about an obscure figure named Osama bin Laden at a time when the U.S. government was turning a blind eye to the ISI's support for him. Tomsen writes of the al Qaeda chief's sanctuary in Pakistan, "[Pakistani President Pervez] Musharraf and the ISI practiced plausible deniability concerning bin Laden's whereabouts. They knew exactly where he was." This is a bold claim, and much more so for having been written long before the May 2 U.S. raid in Abbottabad that killed bin Laden.

It is also worth quoting at length a prediction Tomsen made while testifying to Congress in 2003:

The stunning American-led military victory in Afghanistan which ousted the Taliban-al Qaeda regime has not been followed up by an effective, adequately funded reconstruction strategy to help Afghans rebuild their country and restore their self-governing institutions. The initial enthusiasm genuinely felt by the Afghan people that peace was returning has clearly faded. . . . If present trends continue, five years from now Afghanistan is likely to look very much like it does today: reconstruction stagnation, a weak central government starved of resources, unable to extend its influence to the regions where oppressive warlords reign, opium production soars, and guerrilla warfare in Afghan-Pakistani border areas generated by Pakistan-backed Muslim extremists continues to inflict casualties on coalition and Afghan forces.

Today, he writes, even this take is overly optimistic.

Given Tomsen's track record, Americans should give a respectful hearing to his call for a thorough policy reformulation -- something beyond tweaks to troop numbers and counterinsurgency tactics. And given the merits of his book, they should heed his warning not to repeat the mistakes of the past.