The case of Raymond Davis has all the trappings of a 21st century spy novel.
It is a story of murder, prison and clandestine payments, starring a burly former US Special Forces soldier tangled in a murky web of intelligence agencies, competing diplomats and – differentiating his case from Cold War spy sagas – shady private military contractors.
Pakistani authorities released the CIA contractor from prison on Wednesday, after families of two motorcyclists he killed in January were paid a reported $2.3mn in "blood money".
Details surrounding the case are sketchy at best: a series of claims and counter-claims from various diplomats, agencies and organisations which are almost impossible to independently verify. And the stakes are high.
"The case highlights the fact that the US is engaged in a covert war in Pakistan - a country it has not declared war against," says Jeremy Scahill, author of Blackwater: the Rise of the World’s Most Powerful Mercenary Army.
Davis, 36, once hustled for Blackwater, the controversial military contractor responsible for killing civilians in Iraq, which has since been rebranded as Xe Services LLC.
"He worked for Blackwater when the company was working on the drone bombing campaign with the JSOC [Joint Special Operations Command], and the CIA against high-value individuals in Pakistan," Scahill told Al Jazeera.
Davis owns Hyperion Protective Consultants, according to ABC News. The firm sells surveillance equipment and provides clients with "loss and risk management professionals".
In the new world of intelligence, individuals can wear several different hats, often at the same time.
"In theory, it would be cheaper to have government agents do the work contractors are doing: they don't get paid as much and there is no dedicated profit margin," says Eamon Javers, author of Broker, Trader, Lawyer, Spy: The Secret World of Corporate Espionage.
"There is a huge open question about the legal jurisdiction these contractors are operating under in war zones. They are not accountable to US military justice, as special ops would be," Javers told Al Jazeera.
Christine Fair, a Pakistan expert at Georgetown University says, "There is nothing abnormal about military contractors gathering intelligence, conducting warfare or helping with diplomacy", concerns about high costs, impunity and jurisdiction notwithstanding.
"The way we [Americans] do business, fight wars, provide assistance, and the way we run our embassies is being done through contractors," Fair told Al Jazeera.
Who is immune?
When Pakistani authorities arrested Davis in Lahore, he carried classic tools of the spy trade: a Glock semiautomatic pistol, a long-range wireless set, camera, flashlight and small telescope.
The initial public conflict between Pakistan and the US revolved around Davis's diplomatic status. The US said the contractor had diplomatic immunity from prosecution, while Pakistani authorities disputed the claim.
According to Fair, the issue of diplomatic immunity is simple and was "misconstrued" throughout the Davis saga. Whether Davis was a contractor or a formal embassy employee is not important for the question of immunity, she says.
"The diplomatic status of staff members is set by the sending countries," she says, referring in this case to the US. "The Pakistani government has one choice to make: to accept the terms or not to. Pakistan accepted the terms and issued a visa and then re-issued it."
There is no debate about the process for getting diplomatic immunity, as Pakistan and the US have signed the Vienna Convention which sets out the rules.
But Jeremy Scahill is not sure Davis's diplomatic status is quite so clear. "There have been some reports that the US tried to claim he was a diplomat after the events took place," Scahill says.
Conflicting crime stories
The events in question transpired on January 27. Davis was driving his car through a poor section of Lahore. He stopped at a crowded intersection. Two Pakistani men jumped off motorcycles and came towards him, with weapons drawn, according to American accounts of the incident. Davis opened fire with his Glock, killing them.
He said he fired in self-defence, assuming they were trying to rob him. Pakistani authorities disputed this claim, saying the men were shot in the back and Davis got out of his car to take photographs of the bodies.
Pakistani security forces chased Davis to a traffic circle a short distance away from the crime scene and arrested him. Before being taken down, Davis called the US Consulate to extract him from the dicey situation. The US sent an unmarked SUV tearing through the streets of Lahore.
It drove the wrong way down a one way street, killing a random motorcyclist, in a development that further infuriated Pakistanis. The three killings lead to widespread outrage, fuelling anti-American demonstrations.
"Those who oppose the partnership between Pakistan and the US have been making noise," says Rasul Baksh Raees, a political science professor at Lahore University of Management Sciences.
Wary of anger on the streets, Pakistan's government may have initially denied giving the contractor immunity to save face, says Muqtedar Khan, a professor of international relations at the University of Delaware.
Many Pakistanis, including the political opposition, are furious about US drone strikes and other killings in the country. But this is nothing new.
The intrigue concerns the identities of the men Davis killed - and the nature of his mission.
"Some suggest Davis was trying to document links between Pakistan's Inter-Services Intelligence agency (ISI) and Lashkar-e-Taiba [the Army of the Pure], which would expose the ISI's links to the Mumbai attacks [of 2008]," says Khan. The US and UN Security Council have designated Lashkar as an international terrorist organisation.
In February, Leon Panetta, the CIA director, said the ISI-CIA relationship is one of the "most complicated" he has encountered during his time in intelligence.
"If Ray Davis was targeting Laskhkar or trying to establish links between it and Pakistani intelligence, that would be probably one of the most sensitive places to hit the ISI," says Jeremy Scahill, the author and investigative journalist.
In a US federal court in New York, a lawsuit was filed in 2010 against the ISI for backing the Mumbai attacks. Davis's conclusions could have damaged more than the ISI's public image. US tax dollars paid to Pakistani security forces under the auspices of fighting terrorism, not to mention a major financial settlement, could be at stake.
Christine Fair, the Georgetown professor, says two high-level Pakistani officials told her that the men Davis killed were ISI agents tasked with following him.
Davis worked out of a safe house in an obscure part of Lahore as part of a CIA cell investigating Lashkar, Fair says.
"The CIA cooperates with the ISI on certain issues," Fair says. "But these organisations also operate against each other. This is spy versus spy."
The origins of Lashkar can be traced to US support for forces fighting against the Soviets in Afghanistan during the 1980s, Khan says. Today, the group operates openly in Pakistan from a sprawling compound in the suburbs of Lahore, where it runs schools, hospitals and a blood bank. Hafiz Saeed, the group's leader, is a frequent commentator in the Pakistani press.
The group frequently espouses anti-Western ideology, targeting India, Israel and the US in their literature, says professor Fair, adding that "they never really operated to achieve those larger objectives – perhaps until 2004, when they started attacking the US in Afghanistan".
The ISI and some other branches of Pakistan's government see Lashkar as an important tool against India in Kashmir, a province claimed by both India and Pakistan, says Muqtedar Khan.
"In recent years, the balance of power has shifted significantly in India's favour, in terms of traditional warfare," Khan says. "The economic disparity is such that Pakistan cannot launch a conventional war against India for Kashmir," he says. Pakistan sees unconventional forces like Lashkar as crucial defences against its traditional rival.
Pakistan also worries about Indian dominance in Afghanistan after the US pulls out, and wants Lashkar ready to fill the vacuum of American power, Khan says.
Raymond Davis's case has caused head-aches for the US and Pakistan. They both hoped it would go-away, but neither could lose face.
The payment of "blood money" to relatives of the men Davis killed - an accepted custom in Pakistan - was the easiest solution.
The sum of $2.3mn is exponentially higher than what the US normally pays family members when its forces kill innocents in Iraq or Afghanistan, Jeremy Scahill says.
Money talks, and such a large sum illustrates the importance of the case. According to Scahill, the blood money suggested by the US state department for victims of Blackwater killings in Iraq was about $5,000.
"What is even more important than the money, is what the Pakistanis and the ISI extracted from the US in exchange for [Davis's] release," Scahill says.
After "blood money" was paid, American consular officials whisked Raymond Davis out of the country. His exact mission, or the conclusions from the intelligence he gathered, may never come to light.
Hillary Clinton, the US secretary of state, denied that the US paid family members. However, she wouldn't comment on who forked over the cash.
"It is rather a charade to suggest [the US] didn't pay family members," says Ray McGovern, a former CIA analyst, who alleged that the payment came from Pakistan's ISI, which receives money from the US through bilateral military cooperation deals.
But Davis's political footprint will last, as anti-American protests spread across Pakistan, with people demanding more accountability from foreign forces operating on Pakistani territory. "Raymond Davis was basically the tip of the iceberg," says Professor Khan.
"He was not the cause, but a part of, the diverging interests between Pakistan and the US in the war on terror."