ISLAMABAD (Reuters) - Pakistans spy agency appears to have gained the most from a CIA contractors release, by forcing the US agency to recognise its importance to the US effort in Afghanistan, and curtailing American activities in Pakistan. A Lahore court Wednesday acquitted CIA contractor Raymond Davis, 36, of murder charges and released him after a deal that involved paying compensation - blood money - to the victims families. Davis shot and killed two Pakistanis in Lahore on January 27. The revelation of armed CIA contractors working in Pakistan deeply angered and embarrassed the Directorate of Inter-Services Intelligence (ISI). Very clearly, the ISI was upset because its a parallel network of intelligence the US appears to have set up, said Ayesha Siddiqa, a military analyst. The ISI wants the United States to rein in contractors like Davis and clear any monitoring of militant groups with it first. They want to keep a close eye on the American operations, she said. There might be an agreement, 'If you want information on these guys, well provide it. Pakistan is considered vital to the American-led effort to stabilise Afghanistan and prevent it from again becoming an al-Qaeda sanctuary. The cooperation of the Pakistani military and ISI is critical in tackling militant hideouts on the Pakistani side of the border. Any rapprochement between the CIA and the ISI has at its heart one idea, Siddiqa said: Whatever you do in Afghanistan, we have to be at the centre of it, we have to be involved. A US official, who requested anonymity because of the sensitivity of the issue, said that relations with Pakistan had taken a hit, especially regarding cooperation in Afghanistan and addressing the countrys dire economic condition, but Washington hoped to get the relationship back on track. What was the price we paid? the official said. We could have made a lot more progress in that time if we hadnt been concentrating on Davis. Blood money - called diyat - is a common and accepted practice in Islamic law and Pakistans criminal code. The United States for weeks argued that Davis had diplomatic immunity, but eventually settled on diyat as a solution to get him released. According to the diyat agreement, a copy of which was obtained by Reuters, the families of Faizan Haider and Faheem Shamshad were each paid 100 million rupees to be distributed among the family members. The expected fury at Davis release has yet to fully materialise, indicating the public largely accepts the payment. Military and intelligence agencies are also likely to be calming the religious parties, which have been loudest in calling for Davis head, Siddiqa said. Though Davis is no longer locked in a Pakistani jail, but the diplomatic storm unleashed by his arrest will likely leave scars on a fragile relationship central to US security. While one diplomatic dispute between the US and Pakistan has found resolution, the fundamental challenges to the relationship certainly remain, said Lisa Curtis, a South Asia expert at the Heritage Foundation. A Pakistani official, speaking on condition of anonymity, said Washington and Islamabad would now work to reschedule high-level meetings that were put on hold after Davis arrest. Officially, we expect things to be the same, but there will definitely be some footprints left on the long-term relationship - and a trust deficit on both sides, he said. A senior US defence official, speaking on condition of anonymity, said he expected no lasting impact to military ties, offering as proof military cooperation against insurgents along the Afghan border that continued during Davis detention. Ripples from the case may be more acutely felt in joint efforts between the CIA and ISI. Daniel Markey of the Council on Foreign Relations said the affair may limit future US intelligence in Pakistan, where it is believed CIA personnel have sought to supplement information provided by the ISI on militant groups. Its only natural that the US government would want to know what these groups are doing; its only natural (Pakistan) wouldnt want us to know what theyre doing, Markey said. A person familiar with the Pakistani governments version of the deal to release Davis said that after extensive talks between the CIA and ISI, Pakistan will tighten its rules on the entry and local operations of CIA personnel and contractors. While resolution of the Davis case may help to cool tempers ... in the immediate term, so long as Pakistan resists taking serious action against terrorist groups ... tensions in the relationship will persist, Curtis said.