Police say Taliban militants have ambushed a police van taking two of their comrades back to jail after a trip to the dentist, freeing the captives.
Officer Iftikhar Khan says three police guards were killed in Friday's incident in the northwestern city of Peshawar.
Khan identified the two freed prisoners as Nadeem Abbas and Zakim Shah. He says they are from the Pakistani Taliban, a militant group waging war against the Pakistani state.
The group group is strong in the northwest close to the Afghan border and has carried out hundreds of attacks since 2008.