The teachers were seized by militants on November 21 from a school in the agency.
They were abducted just after a team giving polio vaccinations had left the school and the militants may have mistaken them for the polio team, Khyber official Niaz Ahmad Khan said.
They were moved to an area controlled by militant leader Mangal Bagh and his Taliban-affiliated group, Lashkar-e-Islam.
Khan said a group of tribal elders, known as a jirga, was sent to secure the teachers' release.
"The militants cooperated with the jirga members and freed all the abducted...teachers," said Khan.
A tribal elder, speaking on condition of anonymity, said the militants freed the teachers on condition the government stop sending polio teams to the area.
Gunmen frequently attack polio vaccination workers, accusing them of being Western spies and part of a plot to sterilise Muslims.
A global eradication campaign has reduced polio cases by 99.9 percent in the last three decades, but it remains endemic in Nigeria, Afghanistan and Pakistan. The disease is highly infectious and can cause irreversible paralysis.
COMMENTS (2)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ
@Spock National policy? Do we have one? in ANY matter?
Talibans are doing what PTI is doing. Taking law in their own hands and decide what can happen in state even if it is against the national policy