PAKISTAN-US/SHOOTINGRaymond Davis, an American who shot and killed two men in Lahore, Pakistan, under disputed circumstances, has just been revealed to be a CIA contractor. What a mess. And it’s a mess that makes me reflect on when I lived in Lahore, in the late 1980s.

Lahore is the cultural capital of Pakistan, home to writers, artists and intellectuals. Variously ruled in recent centuries by the Mughals, the Sikhs and the British during the Raj, Lahore is the great ancient city of the Punjab. There is magnificent old architecture, crazed and crowded marketplaces, sprawling slums. A sense of intrigue is part of the city’s lore, as one would feel in Marrakesh or Kathmandu.

Driving in the old-city areas of Lahore is unlike anything experienced in the West. Roads are bumper-to-bumper, drivers flagrantly disobey traffic laws — roaring the wrong way down a one-way street is practically normal. Davis said his car was wedged in by traffic, a common problem in the city, when he was approached by two men with guns. Having driven in the old-city areas of Lahore, I am sure that being in a wedged-in car and approached by armed men — roving thieves plague Pakistan, and there is nothing equivalent to the reliability of 911 — would be frightening. Whether Davis was justified in opening fire is something the courts must determine.

The revelation that Davis was working for the CIA has roiled Pakistan and embarrassed the United States, because Davis entered Pakistan on a diplomatic passport. Officially, such passports are only for diplomats and their dependents. On a practical basis, the United States and many other nations — surely, at some point, including Pakistan — grant diplomatic covers to intelligence agents. But when a bogus diplomatic status is exposed, this shames the nation involved. The United States looks extra-bad because after the shooting, American officials including President Barack Obama insisted Davis actually was a diplomat, a member of the administrative staff of the U.S. embassy in Islamabad.

Whether diplomatic immunity applies to Davis is a matter of keen debate. Often, intelligent agents caught in situations such as this are quietly spirited out of the country as the host government agrees to look the other way. Because the Davis case has stirred such controversy in Pakistan — was it really robbery, why did Davis fire so many times, what about the U.S. staff car that struck and killed a bystander while speeding toward Davis? — slipping him out of Pakistan would cause general outrage.