The 33-year prison sentence for a Pakistani doctor who helped the CIA find Osama Bin Laden has been overturned and a retrial has been ordered, Fox News reported.

Sahibzada Mohammad Anis, a senior judicial official, overturned the ruling on Thursday because the person who sentenced doctor Shakil Afridi was not authorized to hear the case, according to government administrator Feroz Shah.

Afridi was convicted in May 2012 of conspiring with Islamic militants in Pakistan for giving them money and offering medical treatment. A date for a retrial has not been set and he will remain imprisoned at Peshawar Central jail.

The militants and Afridi's family deny the allegations against him. He was tried under the Frontier Crimes Regulations, which are a set of laws that govern Pakistan's semiautonomous tribal region. Anis, the official who ordered the retrial, is a commissioner under the regulations.

It was not until June of this year that officials lifted a ban that prevented Afridi's family members and lawyers from visiting him. The change happened following a talk between U.S. Special Envoy for Afghanistan and Pakistan James Dobbin and Pakistani leaders.

"I am very happy, and will go to see my brother next week," said Jamil Afridi, who previously appealed to the courts and government to see his brother. "I haven't received anything in writing, but am told that only I will be allowed in to see him."

After speaking with Fox News from prison, Afridi was kept isolated for nine months after expressing his affection for America and detailing his capture by a Pakistani spy agency, after the Navy SEAl raid of Bin Laden's compounds in May 2011. In addition, authorities placed a ban on visitation rights, preventing his attorneys and family members from visiting. Two prison guards were arrested and a senior official was fired after allegedly giving Afridi cell phones.

Afridi's brother credits his appeal to the courts, international media outlets, and his brother's supporters in the U.S. for ban lift and retrial.