In June 2014, as he was preparing to send 300 U.S. military advisers back to Iraq, President Obama hailed the American counterterror campaign in Yemen -- Special Operations advisers (and CIA operatives) on the ground, drones in the air -- as a “model” for what he hoped to do against the Islamic State. In September, as Craig Whitlock of the Washington Post wrote, President Obama “cited his Yemen strategy as a template for confronting jihadist threats in other places, including Iraq and Syria.” He was still making reference to its “success” this January when discussing what had become Iraq War 3.0.

Last week, however, with al-Qaeda militants taking a nearby town, Washington withdrew its final 100 Special Operations advisers in Yemen from a southern air base where U.S. drones had been stationed and halted all military operations in the country. By then, the U.S. embassy in Sana'a, the capital, had been shuttered for a month. Meanwhile $500 million in U.S. weaponry had reportedly gone missing in that country and might be in the hands of almost anyone, including al-Qaeda in the Arabian Peninsula, the local branch of the terror franchise. That group had only grown stronger under years of American drone strikes.

Iranian-backed Houthi rebels now control the north of the country, including Sana'a, and recently seized its third largest city and headed south toward the port of Aden. Yemen seems at the edge of civil war and backers of the Islamic State may even have a foothold there. Strikes from U.S. drones based in Saudi Arabia, among other places, will undoubtedly continue, though assumedly with even less on-the-ground intelligence from Yemeni sources. In sum, as with the invasions of Iraq and Afghanistan and the intervention in Libya, hopes in Washington that once were so high have been dashed. This is, by now, a commonplace experience: the early moments of any U.S. military campaign seem so successful -- and then, with the passage of time, the verdict comes in: another failure for the twenty-first-century American way of war.

Today, TomDispatch regular Dilip Hiro considers one of those failed efforts -- in Afghanistan, where the planet’s former “sole superpower” now seems to be losing out not only to local Taliban militants, whose strength has been on the upswing, but to the power it may fear most: an economically rising China. In these years, from the Middle East to Africa, that country has had an uncanny ability to sweep up the imperial spoils, especially local energy resources, without sending a soldier into battle. Now, it seems, China may be in the process of doing just that in Afghanistan.

On this subject and the associated contest between Pakistan and India for influence in Afghanistan, Hiro, whom Jeremy Scahill has called “the quintessential non-aligned journalist... the master chronicler of some of history’s most epic battles,” knows a thing or two. His monumental new book, The Longest August: The Unflinching Rivalry Between India and Pakistan, is the first definitive history of one of the world’s most intractable conflicts. With a desperate Obama administration struggling over just how many U.S. military personnel to leave in Afghanistan for how endlessly and fruitlessly long, it makes sense to put Washington's perspective aside for a moment and try to get a bead on what’s really happening in South Asia and Afghanistan through a different lens. Tom

Call it an irony, if you will, but as the Obama administration struggles to slow down or halt its scheduled withdrawal from Afghanistan, newly elected Afghan President Ashraf Ghani is performing a withdrawal operation of his own. He seems to be in the process of trying to sideline the country’s major patron of the last 13 years -- and as happened in Iraq after the American invasion and occupation there, Chinese resource companies are again picking up the pieces.

In the nineteenth century, Afghanistan was the focus of “the Great Game” between the imperial powers of that era, Britain and Czarist Russia, and so it is again. Washington, the planet’s “sole superpower,” having spent an estimated $1 trillion and sacrificed the lives of 2,150 soldiers fighting the Taliban in the longest overseas war in its history, finds itself increasingly and embarrassingly consigned to observer status in the region, even while its soldiers and contractors still occupy Afghan bases, train Afghan forces, and organize night raids against the Taliban.

In the new foreign policy that Ghani recently outlined, the United States finds itself consigned to the third of the five circles of importance. The first circle contains neighboring countries, including China with its common border with Afghanistan, and the second is restricted to the countries of the Islamic world.

In the new politics of Afghanistan under Ghani, as the chances for peace talks between his government and the unbeaten Taliban brighten, the Obama administration finds itself gradually but unmistakably being reduced to the status of bystander. Meanwhile, credit for those potential peace talks goes to the Chinese leadership, which has received a Taliban delegation in Beijing twice in recent months, and to Ghani, who has dulled the hostility of the rabidly anti-Indian Taliban by reversing the pro-India, anti-Pakistan policies of his predecessor, Hamid Karzai.

How to Influence Afghans

Within a month of taking office in late September, Ghani flew not to Washington -- he made his obligatory trip there only last week -- but to Beijing. There he declared China “a strategic partner in the short term, medium term, long term, and very long term.” In response, Chinese President Xi Jinping called his Afghan counterpart “an old friend of the Chinese people,” whom he hailed for being prepared to work toward “a new era of cooperation” and for planning to take economic development “to a new depth.”

As an official of the World Bank for 11 years, Ghani had dealt with the Chinese government frequently. This time, he left Beijing with a pledge of 2 billion yuan ($327 million) in economic aid for Afghanistan through 2017.

The upbeat statements of the two presidents need to be seen against the backdrop of the twenty-first-century Great Game in the region in which, after 13 years of American war, Chinese corporations are the ones setting records in signing up large investment deals. In 2007, the Metallurgical Corporation of China and Jiangxi Copper Corporation, a consortium, won a $4.4 billion contract to mine copper at Aynak, 24 miles southeast of Kabul. Four years later, China National Petroleum Corporation in a joint venture with a local company, Watan Oil & Gas, secured the right to develop three oil blocks in northwestern Afghanistan with a plan to invest $400 million.

In stark contrast, 70 U.S. companies had invested a mere $75 million by 2012, according to the Afghanistan Investment Support Agency. What Washington policymakers find galling is that China has not contributed a single yuan to pacify insurgency-ridden Afghanistan or participated in the U.S.-led International Security Assistance Force in that country, and yet its corporations continue to benefit from the security provided by the presence of American soldiers.

In the other equally important realm of soft power, when it came to gaining popularity among Afghans through economic aid, New Delhi outperformed Washington in every way. Though at $2 billion, its assistance to Kabul was a fraction of what Washington poured into building the country’s infrastructure of roads, schools, and health clinics, the impact of India’s assistance was much greater. This was so partly because it involved little waste and corruption.

Continuing the practice dating back to the pre-Taliban era, the Indian government channeled its development aid for the building of wells, schools, and health clinics directly into the Afghan government’s budget. This procedure was dramatically different from the one followed by the U.S. and its allies. They funneled their aid money directly to civilian contractors or to approved local and foreign nongovernmental organizations with little or no oversight. The result was massive fraud and corruption.

By funding the building of a new parliamentary complex on the outskirts of Kabul, the Afghan capital, at the cost of $140 million, India provided a highly visible example of its generosity. This gesture also served to set it off publicly from its regional rival, Pakistan. It has, after all, been a functioning multiparty democracy since independence (except for a 19-month hiatus under emergency rule in 1975-76). In contrast, the military in Pakistan has overthrown its civilian government three times, administering the country for 31 years since its founding in August 1947 following the partition of British India.

That partition took place in the midst of horrendous communal violence between Hindus and Sikhs on one side and Muslims on the other, resulting in an estimated 750,000 deaths and the migration of 12 million people across the freshly delineated borders between the two newly formed countries. Within two months of this unprecedented bloodletting, war had broken out between the new neighbors when the Hindu Maharaja of the Muslim-majority native state of Kashmir joined predominantly Hindu India.

A United Nations-brokered ceasefire came into effect in January 1950. By then, India controlled about two-fifths of Kashmir and repeated its earlier promise that, once normal conditions returned to the disturbed province, a plebiscite would be held in all of Kashmir in which its inhabitants could opt for either India or Pakistan. That plebiscite did not take place because of subsequent Indian foot-dragging. Pakistan’s attempts in 1965 and 1999 to alter the status quo in Kashmir militarily failed. Little wonder that relations between the two neighbors, which openly declared themselves nuclear powers in 1998, have remained tense to hostile, punctuated by periodic exchanges of fire across the heavily militarized border in Kashmir.

A Great Game in the Neighborhood

After the U.S. drove the Taliban regime from Kabul in 2001, a contemporary version of the great game emerged in Afghanistan, as Pakistan and India became involved in a proxy war there. Most of the Taliban’s leaders fled to Pakistan, then ruled by General Pervez Musharraf who was also the chief of army staff. In Pakistan, they were protected by the military’s intelligence service, the powerful Inter-Services Intelligence directorate. Following the almost wholesale diversion of Washington’s military and intelligence resources to invade and occupy Iraq in March 2003, the Taliban leadership, headed by Mullah Muhammad Omar, started rebuilding its movement.

The direct election of Hamid Karzai in 2004 as president of post-Taliban Afghanistan buoyed New Delhi. Karzai had spent seven years in India as a university student. During his stay, he became fluent in Urdu and Hindi, as well as an addict of Bollywood movies and North Indian cuisine. He also came to admire the country’s democratic system. Within two months of assuming the Afghan presidency, he paid a state visit to India.

As the Afghan Taliban, led by its Pakistan-based leadership, regrouped and rearmed, and its insurgency against the Kabul government gathered momentum, relations between Karzai and Musharraf turned testy. To defuse the situation, they met in Islamabad in February 2006. Karzai handed the general a list of Taliban militants, including Mullah Omar, allegedly living in Pakistan. When no action followed -- with Musharraf later claiming that most of the information was old and useless -- his government leaked the list to the media.

On his part, Musharraf started complaining about an anti-Pakistani conspiracy being hatched by the Afghan defense and intelligence ministries, each run by pro-Delhi figures. In an interview with Newsweek International in September, Musharraf claimed that Mullah Omar was actually in the southern Afghan city of Kandahar, which meant that “the center of gravity of this [Taliban] movement is in Afghanistan.” Karzai retorted, “Mullah Omar is for sure in Quetta in Pakistan... We have even given [Musharraf] the GPS numbers of his house... and the telephone numbers.” And so it went.

Last month, in an interview with the Wall Street Journal, Musharraf, now confined to a villa in the Pakistani port city of Karachi, pointed out that India and Pakistan were then in a proxy war on Afghan soil that fed the conflict there. The role his government and the subsequent ones played in nurturing the Taliban and allied militant groups operating in Afghanistan, he argued, was a legitimate counterweight to the acts of rival India. “There are enemies of Pakistan that have to be countered,” he said. “Certainly if there’s an enemy of mine, I will use somebody [else] to counter him.”

Given this zero-sum relationship between the two leading South Asian nations, the increasingly bitter quarrel between Karzai and Musharraf (and his successors) proved music to the ears of policymakers in New Delhi. They were also aware that their country was already far ahead in the Afghan popularity sweepstakes. According to a 2009 opinion poll done by the Afghan Centre for Socio-Economic and Opinion Research, for example, 91% of Afghans had a somewhat or very unfavorable view of Pakistan. The corresponding figure for India was 21%.

During his second term as president, Karzai capitalized on this popular sentiment. In October 2011, Indian Prime Minister Manmohan Singh and he signed an agreement for a “strategic partnership” in which India was, among other things, to “assist, as mutually determined, in the training, equipping, and capacity-building programs for Afghan National Security Forces.”

Pakistani leaders, who regard Afghanistan as their country’s backyard, were alarmed. Their apprehension increased when a news item in the Dubai-based newspaper, the National, cited a report in Jane's Defense Weekly that up to 30,000 recruits from the Afghan security forces were to be flown to India for training over a three-year period. There, they would be equipped with assault rifles and other small arms. Later, rocket launchers, light artillery, and even retrofitted Soviet T-55 tanks might be transferred to them.

There was great anxiety in Islamabad at the prospect of future Afghan commanders being indoctrinated by its mortal rival when Karzai had rejected repeated Pakistani offers to train Afghan army cadets at its military academy. This drove Pakistan’s military strategists to firm up their plans for a worst-case scenario: a two-front assault on the country from India in the east and an Indian-Afghan military alliance in the west.

To their relief, the figure mentioned by Jane's Defense Weekly proved to be wildly inflated. During a Karzai visit to India in December 2013, the two governments announced that the 350 army and police personnel then being trained there annually would be raised to 1,000 in the future and that the focus of their training would be on counterinsurgency and counterterrorism operations. Islamabad was no less relieved to learn that, facing increased security risks in Afghanistan, a consortium of Indian companies had scaled back its investment to mine iron ore there from a projected $10.3 billion to $1.5 billion.

On the China front, invited by President Xi, Karzai attended the summit conference of the Shanghai Cooperation Organization in Beijing in June 2012. There the two leaders issued a joint statement on a “China-Afghanistan Strategic and Cooperative Partnership.” Three months later, China’s internal security chief, Zhou Yongka, visited Kabul and signed a range of Sino-Afghan economic and security agreements that included the training of a modest 300 Afghan police officers over the following four years.

A year later, during another Karzai visit to Beijing, Xi announced a grant of 200 million yuan ($32 million) to Afghanistan for 2013 and offered to host the annual 14-nation regional conference on Afghanistan, the first of which had been held in Istanbul in November 2011.

And so the stage was set for a major twist in both the Great Game in Asia and its limited version being played in Afghanistan.

The China Card

A telling irony is that Afghan President Ghani has been America’s favorite, especially given the spats that Washington had with Karzai, who regularly denounced U.S. air strikes, banned night raids in his country, and refused to sign a bilateral security agreement that would keep U.S. forces there for up to a decade or more. On taking office, Ghani promptly signed the agreement, and then tried to neutralize its impact by actively courting China and Pakistan.

As a start, Ghani made sure to arrive in Beijing just before the Fourth Ministerial Conference of the Istanbul Process on Afghanistan began on October 31, 2014. In his talks with Xi, he reportedly expressed his readiness to confer with the Afghan Taliban and urged the Chinese leader to encourage the Pakistani government to pressure the Taliban’s leaders into peace talks with his administration. He evidently got a receptive response.

Unlike Washington, which has had wildly fluctuating relations with Islamabad, Beijing has a lot more leverage there. Pakistan regards China, its main supplier of arms, as an all-weather ally of the first order. In May 2011, when Pakistan protested that Washington hadn’t given the slightest hint that it would launch its clandestine operation to kill Osama bin Laden in Abbottabad, there was silence in capitals across the planet -- except in Beijing. It supported Pakistan’s complaint. This led that country's ambassador to China, Masood Khan, to describe Sino-Pakistani relations in the most laudatory of terms. “We say it is higher than the mountains, deeper than the oceans, stronger than steel, dearer than eyesight, sweeter than honey, and so on.”

China has its own security concerns. It is increasingly worried about Islamist radicalism among its Uighur population in the autonomous region of Xinjiang adjoining Pakistan. Menacingly, the Islamic State has vowed to “liberate” Xinjiang. Beijing is eager to see training camps run by Uighur Islamist terrorists along the Afghan-Pakistan border shut down, which can only be done with the active cooperation of the Afghan Taliban and its ally, the Pakistani Taliban.

In line with his foreign policy of giving first priority to neighbors, Ghani traveled to Islamabad in late November. There, after meeting with Pakistani Prime Minister Nawaz Sharif, he broke diplomatic protocol by calling on General Raheel Sharif, the powerful chief of army staff, who has the last word on matters of national security. His gesture alarmed the pro-India lobby in Afghanistan, but was applauded by Pakistan’s officials and media.

Later Ghani suspended an order for heavy weapons Karzai had placed with India. In a further sign that he was disengaging himself from India’s embrace, he has so far shown no interest in visiting New Delhi. “Ashraf Ghani is a balanced man,” remarked Musharraf, adding, “I think he’s a great hope” for Pakistan.

Nawaz Sharif has responded positively, altering a long-held Pakistani policy of encouraging the Taliban to stick to a hard line on peace talks. The December 16th killing of 132 Pakistani students, most of them the children of army officers, at the Army Public School in Peshawar helped this process. The leaders of the Tehrik-e-Taliban Pakistan, a homegrown organization close to the Afghan Taliban, masterminded the massacre. In its wake, Sharif declared that there were no longer “good terrorists” and “bad terrorists.”

Ghani welcomed that statement. Reversing Karzai’s policy, he ordered his security forces to begin working closely with their Pakistani counterparts to pacify the badlands along the Afghan-Pakistan border. General Sharif reciprocated by visiting Kabul and holding high-level talks with Afghan officials. Ghani then further changed his country’s policies by sending a symbolic six Afghan army cadets to Pakistan’s military academy for training.

In this way, Ghani seems to be creating an environment conducive to the holding of formal peace talks with the Taliban later this year. If so, a new chapter could unfold in war-torn Afghanistan in which the Chinese role would only grow, while the United States might end up as a footnote in the long history of that country.

Dilip Hiro, a TomDispatch regular, is the author of 35 books. His latest, The Longest August: The Unflinching Rivalry between India and Pakistan, has just been published by Nation Books.

Follow TomDispatch on Twitter and join us on Facebook. Check out the newest Dispatch Book, Rebecca Solnit's Men Explain Things to Me, and Tom Engelhardt's latest book, Shadow Government: Surveillance, Secret Wars, and a Global Security State in a Single-Superpower World.

Copyright 2015 Dilip Hiro