Officials said that Dr. Afridi would not be released before the retrial concluded.

Although he was convicted on charges of aiding a banned Islamist group, Dr. Afridi’s conviction was seen as a proxy for Pakistani accusations that he had helped the C.I.A. trace Bin Laden to a house in Abbottabad. Bin Laden was killed there in a Navy SEAL raid in May 2011.

His original trial was conducted in secret in the tribal belt, where senior government officials double up as judges in tribal disputes. Since then he has been held in a Peshawar prison, where his lawyers say his life is at risk.

Dr. Afridi’s fate has been a matter of contention between Pakistan and the United States. Leon E. Panetta, who was director of the C.I.A. at the time of the raid, confirmed in early 2012 that Dr. Afridi had played a role in the hunt for Bin Laden and expressed anger at his prosecution.

American officials say Dr. Afridi was originally recruited by the C.I.A. about three years earlier to provide intelligence about Islamist militants in the Khyber tribal area, where he was working as a senior medical officer.

In Abbottabad, Dr. Afridi used C.I.A. funds to establish a hepatitis vaccination program that allowed his team to approach the house where Bin Laden was staying in a bid to confirm whether he was indeed inside. But Dr. Afridi did not manage to confirm Bin Laden’s presence in the house, American officials say. That uncertainty led to debate within the Obama administration about whether to order the SEAL raid.