Sen. John Kerry, D-Mass., opposed cutting foreign aid to Pakistan by arguing, among other things, that the Pakistanis haven’t gotten enough credit for their assistance in the operations that led to the killing of Osama bin Laden.

Kerry was responding to Sen. Rand Paul, R-Ky., who suggested that the United States demand that Pakistan release Dr. Shakeel Afridi, whom they arrested after he helped the United States find bin Laden. Kerry noted the logistical support Pakistan provides to the Aghanistan war before suggesting that Pakistan helped American forces get bin Laden.

“Our folks were able to cooperate on the ground in Pakistan,” Kerry said during his first hearing about his nomination to replace Hillary Clinton as Secretary of State. “That’s one of the ways we were able to get Osama bin Laden. I don’t think the Pakistanis have frankly gotten credit, sufficiently, for the fact that they were helpful. It was their permissiveness in allowing our people to be there that helped us to be able to tie the knots that focused on that. To some degree — not exclusively, obviously, but to some degree.”

Kerry also pointed out that the Pakistanis “have lost some 6000 people just in the last year in their efforts to go after terrorists.”

Afridi was arrested after working as a CIA informant to help find bin Laden, who was living in a compound in Abbottobad, Pakistan, before Navy Seals killed him. He told Fox News that he has been tortured for helping with the operation.

“I tried to argue that America was Pakistan’s biggest supporter – billions and billions of dollars in aid, social and military assistance — but all they said was, ‘These are our worst enemies. You helped our enemies,’” Afridi said, describing the response he got from Pakistan’s Inter-Services Intelligence.

The State Department has called for his release. “We believe that the prosecution and conviction of Dr. Afridi sends the wrong message about the importance of our shared interest in taking down one of the world’s most notorious terrorists,” a spokesperson told Fox.

The U.S. military didn’t tell Pakistan that the raid would take place due to fears that they would warn bin Laden. “It was decided that any effort to work with the Pakistanis could jeopardize the mission,” then-CIA director Leon Panetta said in May 2011. “They might alert the targets.”

Pakistan reportedly granted China access to the stealth helicopter that crashed during the bin Laden raid.