By JANE PERLEZ
ISLAMABAD, Pakistan — Pakistan’s chief spy agency has demanded an accounting by the Central Intelligence Agency of all its contractors working in Pakistan, a fallout from the arrest last month of an American involved in surveillance of militant groups, a senior Pakistani intelligence official said Friday.
Angered that the American, Raymond A. Davis, worked as a contractor in Pakistan on covert C.I.A. operations without the knowledge of the Pakistanis, the spy agency estimated that there were “scores” more such contractors “working behind our backs,” said the official, who requested anonymity in order to speak candidly about a delicate matter between the two countries.
In a slight softening of the Pakistani stance since Mr. Davis’s arrest, the official said that the American and Pakistani intelligence agencies needed to continue cooperation, and that Pakistan was prepared to put the episode in the past if the C.I.A. stopped treating its Pakistani counterparts as inferior. “Treat us as allies, not as satellites,” said the official of the Directorate for Inter-Services Intelligence, or ISI. “Respect, equality and trust are needed.”
George Little, a C.I.A. spokesman, said the American spy agency’s ties to the ISI “have been strong over the years, and when there are issues to sort out, we work through them.”
“That’s the sign of a healthy partnership,” Mr. Little said.
The arrest and detention of Mr. Davis, 36, after he shot and killed two motorcyclists in Lahore soured already testy relations between two governments that are supposed to have a common front in the fight against terrorism.
The top American and Pakistani military leaders, including the chairman of the Joint Chiefs of Staff, Adm. Mike Mullen, and the leader of the Pakistani Army, Gen. Ashfaq Parvez Kayani, met this week in Oman, where the Davis case was discussed.
According to a report by a former head of the Pakistani Army, Gen. Jehangir Karamat, who runs a research and analysis center based in Lahore, both sides agreed to try to “arrest the downhill descent.”
Even so, the Pakistani intelligence community was divided over how quickly to settle the Davis case and how much to extract from the C.I.A., said a Pakistani official with intimate knowledge of the situation, who declined to be named because of the delicacy of the issue.
At a minimum, the ISI wants an accounting of all the contractors who work for the C.I.A. in roles that have not been defined to Pakistan and a general rewriting of the rules of engagement by the C.I.A. in Pakistan, the official said.
In another sign that the two spy services were trying to patch up their differences, Leon E. Panetta, the director of the C.I.A., spoke on Wednesday with Lt. Gen. Ahmed Shuja Pasha, the ISI director, about resolving Mr. Davis’s case, American and Pakistani officials said on Friday. Mr. Davis, who appeared in handcuffs on Friday for a hearing in a closed courtroom at the jail where he is being held in Lahore, faces possible murder charges.
The Obama administration insists that Mr. Davis has diplomatic immunity and should be released. The Pakistani government has left the determination on diplomatic immunity to the Foreign Office and a hearing before the Lahore High Court on March 14.
Some senior Pakistani intelligence officers were unwilling to have Mr. Davis released under almost any circumstances, said the official with knowledge of the split in the intelligence community.
He said others wanted to use the Davis case as a bargaining chip to get the withdrawal of a civil lawsuit filed in Brooklyn last year that implicates the ISI chief, Lt. Gen. Ahmed Shuja Pasha, in the November 2008 terrorist attacks in Mumbai, India.
The demand for the C.I.A. to acknowledge the number of contractors in Pakistan was driven by the suspicion that the American spy service had slipped many such secret operatives into Pakistan in the past six months, the senior ISI official said.
The increase occurred after a directive last July by the Pakistani civilian government, which is often at odds with the ISI, to its Washington embassy to expedite visas without supervision from the ISI or the Ministry of Interior, the senior ISI official said.
The behavior of people like Mr. Davis is deeply embarrassing to the ISI because it makes the agency “look like fools” in the eyes of the anti-American Pakistani public, the ISI official said.
The Davis case made it hard to explain to Pakistanis why the ISI was cooperating with Washington, he said.
The clampdown on American contractors by the Pakistani authorities appeared to be under way Friday with the arrest of an American citizen, Aaron Mark DeHaven, in the northwestern city of Peshawar.
The Peshawar police said Mr. DeHaven was detained because he had overstayed his business visa after his request for an extension last October was turned down.
There was no immediate accusation that Mr. DeHaven worked for the American government, a security official in Peshawar said. But the arrest of Mr. DeHaven, who is married to a Pakistani woman, appears to be a signal that the Pakistani authorities have decided to expel Americans they have doubts about.
The security official said Mr. DeHaven owned a firm, Catalyst Services in Peshawar, that rented houses for Americans in the city.
The American Embassy in Islamabad said in a statement that it did not have details about Mr. DeHaven but that it was arranging consular access for him through the Pakistani government.
During his first months in Pakistan in early 2010, Mr. Davis, the contractor for the C.I.A., was attached to the American Consulate in Peshawar and lived in a house with other Americans in an upscale neighborhood, according to Pakistani officials.
At the 20-minute court hearing on Friday, Mr. Davis told the judge he would not take part in the proceedings because he had diplomatic immunity, Pakistani officials told reporters later.
He refused to sign the charge sheet presented to him, the officials said. The Obama administration insists that Mr. Davis acted in self-defense when the two motorcyclists tried to rob him.
In the charge sheet, the Pakistani police said Mr. Davis shot the motorcyclists multiple times from inside his car, and then stepped from the car and continued shooting with his Glock pistol. Mr. Davis then drove from the scene and was arrested several miles away, the police said.
At Friday Prayers in Lahore and in Islamabad, the capital, anti-American sermons, in some cases laced with references to Mr. Davis, were common.
Hafiz Saeed, the founder of the militant group Lashkar-e-Taiba, which Mr. Davis is believed to have been conducting surveillance on, said the American was “a spy, committing terrorism, helping in drone attacks.”
Banners reading “Hang Davis” and “No immunity to Davis” were strung across the road adjacent to Mr. Saeed’s headquarters.
Ismail Khan contributed reporting from Peshawar, Pakistan, and Waqar Gillani from Lahore, Pakistan.