London (CNN) -- On a recent visit to India, British Prime Minister David Cameron had this to say about Pakistan, historically a close friend of the West's: "We cannot tolerate in any sense the idea that this country is allowed to look both ways and is able, in any way, to promote the export of terror, whether to India or whether to Afghanistan or anywhere else in the world." Seen by the Pakistani government as a slap in the face, Cameron's remarks almost caused a diplomatic breach in relations between the two countries. His remarks followed the leaking of U.S. documents on the WikiLeaks website in which Pakistan's Inter-Services Intelligence agency was accused of secretly aiding and inflaming the Taliban insurgency in Afghanistan, and they engendered a heated debate in Western capitals on whether Pakistan is a friend or a foe.
@highlight
Pakistan acted as U.S. spearhead against Soviet Union when it invaded Afghanistan
@highlight
Fawaz Gerges says the U.S. lost interest, leaving Pakistan to pick up pieces in Afghanistan
@highlight
He says Pakistan relied on Afghan Taliban to impose order on Afghanistan
@highlight
He says Pakistan sees its interest tied to Taliban and need to counter influence of India
West
What this simplistic argument neglects is that Pakistan serves its own vital national interests and cooperates with the @placeholder only to advance those interests.
Pakistan
Pakistani
Pakistan
Pakistan
Pakistan
Pakistan
Pakistan
Pakistan
In return, Pakistan's security forces received logistical and financial aid from the U.S., but more important, @placeholder gained the upper hand in Afghanistan, becoming a paramount arbiter of its neighbor's internal affairs.
Afghanistan
Afghanistan
Afghanistan
Afghanistan
Afghanistan
For example, since last year, U.S. officials say the Pakistani military has launched a powerful offensive against the Pakistan Taliban, who are allied with the @placeholder Taliban, because the former began to threaten the current Pakistani government.
Taliban
Afghan Taliban
Taliban
For example, since last year, U.S. officials say the Pakistani military has launched a powerful offensive against the Pakistan Taliban, who are allied with the Afghan @placeholder, because the former began to threaten the current Pakistani government.
Taliban
Afghan Taliban
Taliban
On the other hand, the Pakistan military appears to be reluctant to attack the Afghan @placeholder, as the West demands, because it wants to leverage the Taliban in any future settlement in Afghanistan.
Taliban
Afghan Taliban
Taliban
On the other hand, the Pakistan military appears to be reluctant to attack the Afghan Taliban, as the West demands, because it wants to leverage the @placeholder in any future settlement in Afghanistan.
Afghanistan
Afghanistan
Afghanistan
Afghanistan
Afghanistan
Pakistan's conduct via Afghanistan is driven by geostrategic concerns and fear of Indian influence in its backyard, not by intrinsic hostility or friendship toward the West or the @placeholder Taliban.