In the shadows of the American operation that killed Osama bin Laden, the fate of a small-town Pakistani doctor recruited by the C.I.A. to help track the Qaeda leader still looms between the two countries, a sore spot neither can leave untouched.

Picked up by Pakistani intelligence agents days after the Bin Laden raid a year ago and now in secret detention, the doctor, Shakil Afridi, has embodied the tensions between Washington and Islamabad. To some American officials he is a hero, worthy of praise and protection; Defense Secretary Leon E. Panetta has personally appealed for his release. But inside Pakistan’s powerful military, still smarting from the raid on its soil, he is seen as a traitor who should face treason charges that could bring his execution. “We need to make an example of him,” one senior intelligence official said.

Beyond hard feelings and talk, however, his case has had a much wider effect: It has also roiled the humanitarian community in Pakistan, giving rise to a wave of restrictions that have compromised multimillion dollar aid operations serving millions of vulnerable Pakistanis, a report in The New York Times said Thursday.

Hardest hit is Save the Children, the largest international aid agency in Pakistan.

Dr. Afridi has told interrogators for the top Pakistani military intelligence agency, the ISI, that he was introduced to the C.I.A. through Save the Children, according to Pakistani officials and Western aid workers. Save the Children vigorously denies the claim, saying it has been made a scapegoat by a desperate man who, according to senior American officials, has been tortured in Pakistani custody. Nevertheless his claims have had a stark impact on an organization that says it spent $105 million last year helping seven million Pakistanis, most of them women and children.

Senior managers have been forbidden from leaving the country, other staff members have been refused visas, and aid supplies have been blocked by customs officials, depriving an estimated 35,000 infants of medical care over a three-month period. Pakistani intelligence has monitored the phone calls and residences of Save the Children staff.

Other aid groups complain of problems, too, largely at the hands of Pakistani officials convinced that their employees could be spies. To them, the affair sheds new light on a murky practice that they say should never take place: the recruitment of aid workers as intelligence operatives in a sensitive country like Pakistan, already awash in conspiracy theories about Western meddling.

“The C.I.A. needs to answer for this,” said David Wright, the country manager for Save the Children, who has not left Pakistan since his visa expired last October. “And they need to stop it.”

In some ways, Dr. Afridi, 48, was a textbook subject for intelligence operators looking to hire a pair of eyes in Pakistan’s lawless tribal regions. Described by friends as ambitious and talkative with a sharp eye for making money, he rose from humble origins to become the government’s surgeon general in Khyber Agency, a tribal area along the Afghan border. Soon, he was in charge of a house-call polio vaccination program, which necessitated travel across the district.

But Dr. Afridi had a reputation for hustling as well as healing, and he faced multiple allegations of corruption and professional malpractice, according to officials, colleagues and government papers ,The New York Times claimed to have seen.

At his private practice, several patients claimed he performed improper operations to make extra money, prompting a local warlord named Mangal Bagh to detain him for a week in 2008 until he paid a fine of $11,100. In June 2010, 11 months before the Bin Laden raid, a female nurse filed a sexual harassment complaint that caused him to lose his job for six months.

The C.I.A. saw Dr. Afridi differently. He was a “dedicated medical professional who had made a career of providing health care, especially vaccinations, to women and children,” said a senior American official with knowledge of his case. He was recruited “several years” ago, the official said, with instructions to collect information about Bin Laden’s network in the Federally Administered Tribal Areas, as his home region is officially known

“Dr. Afridi was asked only to continue his program providing health care and vaccinations in the FATA and elsewhere, and to let us know if he saw Al Qaeda when he was there,” the official said.

Dr. Afridi’s mission in Abbottabad, however, was different: he was asked to set up a hepatitis B vaccination scheme that would enable him to take blood samples from the inhabitants of Bin Laden’s sprawling, three-story house, providing DNA evidence the C.I.A. could use to prove he was there. But Dr. Afridi was not told the identity of his target, the official said.

In between vaccination rounds, Pakistani intelligence said, Mr. Afridi would smuggle himself into the American Embassy in Islamabad in the back of a vehicle to meet a C.I.A. handler calling himself Peter.

Ultimately, though, Mr. Afridi failed to establish Bin Laden’s presence in Abbottabad or gather useful DNA, his main achievement was to establish cellphone contact with Abu Ahmed al-Kuwaiti, the “courier” who guarded Bin Laden.

But he did, over the years, provide “valuable information” about Islamist extremists that saved both American and Pakistani lives, the official said. “His activities were not treasonous, as some have suggested; they were heroic and patriotic,” he said.

That is not the view inside Save the Children, where the doctor’s allegations of collusion with American spies have had stern repercussions.

In July 2011, two months after the Abbottabad raid, officials at the American Consulate in Peshawar warned Save the Children management that they faced an imminent “security risk,” said Mr. Wright, the group’s country director. Believing that threat could come from the ISI, which at the time was quietly pressing to expel the agency from Pakistan, he evacuated his Western staff members to Bangkok and moved senior Pakistani employees into a luxury hotel.

Meanwhile at Islamabad’s airport, the customs authorities impounded a consignment of medicines for four months, and as a result, 35,000 children in the tribal belt missed their treatments. Mr. Wright attributed the delay to Dr. Afridi’s case.

Dr. Afridi’s had some connection with Save the Children, Mr. Wright admitted. He attended four medical training courses run by the aid agency between 2007 and 2010, and unsuccessfully applied for a job in 2009. Otherwise, he said: “There’s not a scrap of proof, apart from the word of one very spurious character. But his story is doing us a lot of harm.”

Other aid agencies make similar complaints. In a letter to the C.I.A. director, David H. Petraeus, in February, Interaction, a consortium of 200 American nongovernmental organizations, said it feared his agency’s actions contributed to “an uptick in targeted violence against humanitarian workers” in Pakistan.

Experts in polio, a scourge that Pakistan is struggling to shake off with the help of at least $100 million in annual financing provided by Western donors, including the Bill and Melinda Gates Foundation, say the C.I.A. scheme demonstrably harmed their work last year.

Loch K. Johnson, a professor of international affairs at the University of Georgia who was on the staffs of Congressional intelligence reform panels in the 1970s and the 1990s, said every job category used by the agency abroad for spying produces complaints.

 “If they use an oil rigger, businesses say it endangers all the other oil riggers,” said Mr. Johnson, who recalled discussing the matter with William E. Colby, the C.I.A.’s director from 1973 to 1976, who complained then about “a melting ice floe of adequate cover” as scandal led to new limits.

But Mr. Johnson said he did believe it was a mistake for the C.I.A. to use public health workers like Dr. Afridi in developing countries. “That’s a particularly sensitive group that does ethical and important work in very dangerous areas,” he said.

The United States is not the only Western country accused of using aid work as cover in Pakistan. In January, the Pakistani police arrested three Germans posing as aid workers in Peshawar. Pakistani intelligence officials say the three were working for the German Federal Intelligence Service. Immediately after, the German state development agency, which had been linked to the men in the local news media, was forced to temporarily withdraw its staff from Khyber-Pakhtunkhwa Province.

Dr. Afridi’s case is far from resolved. The government’s Abbottabad Commission, which is investigating the Bin Laden raid, has recommended that Dr. Afridi should face treason charges even before it has published its findings, expected this month. Others say the case is more complicated, arguing that it may fall under local tribal law, which would not allow the death penalty but could lead to anything from a quiet release for Dr. Afridi to perpetual imprisonment.

In any event, one senior government official said, “He is in for a long haul.”