Earlier this week, Afridi's family and lawyers said he was innocent and would appeal, but said they had not yet seen the court decision. They refused to comment on his relations with the CIA. The trial was carried out in a court in the country's tribal regions close to Afghanistan. A political official, in consultation with tribal elders, ruled on the case in secret.
The United States has called for Pakistan to release Afridi, and his punishment has become another flash-point issue in the fractured relations between the two countries. Pakistan's army was outraged by the U.S. raid that killed bin Laden last May because it was a violation of the country's sovereignty and added to perceptions that it was a sponsor of terror.
Afridi ran a vaccination campaign on behalf of the CIA to collect blood samples from bin Laden's family at a compound in Abbottabad. It was unclear whether he succeeded, but U.S. officials have publicly said he helped the effort to track bin Laden.
The fact Afridi was technically convicted for militancy, not helping the CIA, could complicate Washington's efforts to press for his release. Pakistan could argue that his trial was an internal matter that has nothing to do with the United States.
The verdict said Afridi was guilty of conspiring with a militant group led by commander Mangal Bagh. It said he gave money to the group and treated its leaders at a hospital in Khyber when he was stationed there. According to unnamed witnesses, he did this because of his "deep affiliation with the group." Others, also unnamed, said the group planned terrorist attacks in Afridi's office.
The verdict, which was passed down last week, found Afridi guilty of "conspiring against the state" and other charges.
Pakistani officials didn't attempt to correct widespread reports that the charges referred to his work with the CIA. The conviction triggered anger in the United States and elsewhere, with many questioning how helping kill bin Laden - a sworn enemy of Pakistan - could be seen as working against the state.
The full text of the verdict means Pakistan can now, technically at least, deflect that criticism.