The prisoners, including 20 dangerous militants, escaped from the central prison in Bannu city after the Taliban fighters fired rockets and lobbed grenades at its main gate at 1.30 am local time, said Mian Iftikhar Hussain, Information Minister of Khyber-Pakhtunkhwa province.
Among the dangerous militants who got away were some foreign fighters and Adnan Rashid, who was on death row for involvement in an assassination attempt on former President Pervez Musharraf.
The former military ruler had survived two deadly terrorist attacks in December 2003.
Jail officials said a total of 944 prisoners were in the jail when it was attacked. The Tehrik-e-Taliban Pakistan claimed responsibility for the attack.
Taliban spokesman Ehsanullah Ehsan phoned reporters in northwest Pakistan and said the militants had carried out the attack. He said the attackers and escaped prisoners were on their way to different destinations.