The Pakistani doctor who helped the CIA find Osama bin Laden faced accusations of corruption and other wrongdoing long before he was captured by Pakistani intelligence agents and then jailed for 33 years for treason.
In interviews over the weekend, several current and former Pakistani officials described the doctor, Shakil Afridi, as a hard-drinking womaniser who had faced accusations of sexual assault, harassment and stealing. They said his main obsession was making easy money.
According to a 2002 Pakistan health department document seen by Reuters, Afridi was deemed to be corrupt and unreliable and unfit for government service.
US officials have hailed Afridi, aged in his 40s, as a hero for helping pinpoint bin Laden's location in the Pakistani town of Abbottabad where the al Qaeda leader was killed in May last year in a raid by US Navy SEALs.
Officially Pakistan has said nothing about Afridi except that the court's decision to sentence him should be respected. But the fresh accusations about Afridi's character, coupled with his imprisonment, will almost certainly lead to further strain on already tense bilateral ties.
Pakistani officials' attempts to cast doubt on Afridi's character will likely be viewed in some quarters as retaliation for his work with the Americans, despite the disclosures in the 2002 Pakistani document.
US officials called the accusations character assassination. In Washington, one senior official said the US government was unaware of any questionable behaviour by Afridi.
"Available information showed Afridi was a respected member of the Pakistani health care community," said the senior official. "We are aware of efforts, put in place since Dr. Afridi's arrest, to denigrate his character."
Another US official said: "It's nothing short of puzzling that Pakistani officials would disparage someone who helped in the hunt for bin Laden, a terrorist who had Pakistani blood on his hands."
The Afridi family's lawyer declined to be drawn on the controversy.
"I cannot comment on any past allegations against him," Raza Safi told Reuters.
Afridi ran a vaccination campaign in Abbottabad and used cheek swabs to try to gather DNA from bin Laden's children, said one former Pakistani security official familiar with the case.
Accompanied by three health workers, he went to bin Laden's house and told his wives that a vaccination programme was underway in the area, said the former security official.
"A woman went in (to the house) and said 'bring the children out, the doctor is waiting and he will give them the drops'," the former official said. "That's when he used the swabs."
It was unclear whether the CIA used the swabs to determine if the children were bin Laden's. A DNA test can prove close blood relations and US authorities could have matched the samples with profiles it had collected from several of bin Laden's relatives.
In Washington, another senior US official with knowledge of Afridi's work for the CIA said the doctor's vaccination efforts had also enabled him to gather intelligence on bin Laden's couriers who visited the house.
"Dr Afridi was inadvertently able to confirm something we already suspected - that bin Laden's couriers practised extraordinary operational security," the official said.
"Was that a key to the raid? No. Was it important? Absolutely."
US Defence Secretary Leon Panetta said on Sunday that Afridi "was not working against Pakistan. He was working against al Qaeda. And I hope that ultimately Pakistan understands that".
"Because what they have done here, I think, you know, does not help in the effort to try to re-establish a relationship between the United States and Pakistan."
US Congressman Dana Rohrabacher introduced legislation in February calling for Afridi to be granted US citizenship and said it was "shameful and unforgivable that our supposed allies" charged him.
Infuriated by the unilateral US raid in a town just a two-hour drive from the capital Islamabad, many in the country see Afridi as a villain who conspired against the state and brought unwanted scrutiny of Pakistan's attitude to militants.
Last week, a tribal court sentenced him to 33 years in prison for working with a foreign intelligence agency.
Afridi is being kept in solitary confinement in a prison in the city of Peshawar for fear that he may be targeted by Islamic militants also incarcerated there, said prison sources.
Afridi had been working with the CIA for years before the bin Laden raid, providing intelligence on militant groups in Pakistan's unruly tribal region, said the former Pakistani security official and a former Pakistani intelligence official.
They and other officials said he was of questionable character.
"Afridi was known to perform surgeries even though his qualification was basic and he was not authorised to conduct surgery," a senior provincial health official said.
"He was accused of conducting surgeries of the eyes, nose, ears, kidneys."
Afridi was also in contact with militant groups and treated Taliban fighters who were wounded in battle with the Pakistani military, said the former security official.
The Taliban are described by the state as terrorists, and most Pakistanis strongly oppose their suicide bombing missions, and philosophy.
"Keeping in view his extreme lust for money, I am ashamed to even call him a doctor. He is a corrupt, unreliable and low category officer," said a March 2002 provincial health department report on Afridi's performance and conduct.
The document described Afridi as unreliable, cruel and inhumane and gave him the lowest job performance scores in most categories. It went on to say:
"If his overall character as a doctor is taken into account I would recommend and feel that he is not at all fit for government service or any position where money is involved."
Tariq Hayat, formerly the highest government official in the Khyber tribal region, said he knew Afridi when the doctor worked at a hospital there and was a senior medical officer.
Hayat said he met him twice to question him over allegations that he had sexually assaulted a nurse at his hospital and had stolen its electrocardiograph machines for his private practice.
"I made him stand ... I told him you are a characterless person, you have no principles," said Hayat, adding he had Afridi fired and expelled him from Khyber. "I said 'you are a thief, doctor'."
A senior health official who said he saw a record of the case said a nurse had complained about sexual harassment to the regional health director. That account was confirmed by a senior police official who investigated Afridi.
"A number of nurses had complained about him, that he had behaved inappropriately with them," said the police official, adding that Afridi was also accused of stealing material sent by international aid agencies and selling it.
These accounts could not be independently verified.
Afridi's brother Jamil described the treason charges as baseless and said the doctor was being made a scapegoat.
"If my brother had done something wrong, he had a valid US visa. He could have fled the country," he said, adding that the family had received no offers of help from the US government.
He did not respond to questions about the charges of corruption and harassment.
"I am in hiding because my life is in danger, all of our lives are in danger," Jamil Afridi said. "The family is safe for now but the propaganda campaign in the media is putting us in a lot of danger."
Some health workers who knew Afridi described him as a dedicated, polite professional.
"He was very nice to all the people in the team and did his job very diligently," said Naseem Bibi, a nurse.
She said she had been with him when the medical team visited bin Laden's house. "Yes, he was very interested in this house on that day, but I wasn't sure why," she said.
His reputation hurt by allegations, Afridi was easy prey for the CIA which found him through his connections to Western aid agencies in about 2009, said the former security official.
"The man was living beyond his means after he was fired," said the former security official. "He got married a third time. He maintained a couple of cars."
Afridi, who came to Abbottabad to carry out the vaccination campaign apparently at the CIA's behest, blundered when he visited the district health officer in the town.
He told the officer he was a volunteer who wanted to provide vaccinations in a certain area and he gave the officer his real name, the former security official said.
The team moved from house to house conducting vaccinations and leaving chalk marks on the door to show the people inside had been vaccinated, as is customary in Pakistan.
"They went in systematically the way a team is supposed to work," said the official. "No eyebrows were raised."
But after bin Laden was killed, his widows unwittingly helped Pakistani authorities track Afridi.
"They said that the only time when somebody from outside visited the house, was this polio vaccination (team)," said the former security official, who believed the only other visitor to the house was bin Laden's courier, about once a month.
Afridi was quickly scooped up by security officials.
When interrogated, Afridi initially said he had no ties with Americans, said the former security official.
"He categorically denied everything to start with," said the former security official. "But when the Americans started asking for him, then I think the cat was out of the bag."