The gunmen launched their attack around midnight with a series of heavy explosions before firing rocket propelled grenades and machine guns, a senior police official said.

During the attack on Central Prison in Dera Ismail Khan of Khyber Pakhtunkhwa province bordering the restive South Waziristan agency, the militants killed six policemen, six Shia prisoners and two private security guards, he said.

"Five more policemen and two civilian were injured in the attack," said deputy commissioner Amir Khattak.

Officials said that at least 247 prisoners were missing after the attack and a search for the fugitives continued who were suspected to be taken away by the militants.

Tehrik e Taliban Pakistan has claimed responsibility for the attack, saying that over 100 militants, including several suicide bombers, participated in the massive jail break.

"We lost two of our men in the fight," Taliban spokesman Shahidullah Shahid said, adding that the militants have achieved their targets and their operation was successful.

The jail holds up to 5,000 prisoners including about 250 militants and high-profile rebels involved in attacks on security forces and sectarian killings.

Shaukat Yousafzai, spokesman for the Khyber Pakhtunkhwa provincial government, said, "the army has been called in to counter the militant attack." However, Yousafzai said he has no information of the prisoners' escape.

Advisor to Khyber Pukhtoonkhwa Chief Minister for Jail Malik Qasim said the militants under the guise of police uniform first blown up the main transmission, plunging the entire area in to darkness and then launched massive attack with rockets and hand grenade.

Residents in Dera Ismail Khan heard over 20 explosions near the prison. A curfew was imposed in the city as a search operation continued to apprehend the escaped fugitives.

In April 2012, Taliban militants armed with automatic weapons and rocket-propelled grenades battled their way into a prison in the city of Bannu in northwest Pakistan, freeing close to 400 prisoners, including at least 20 described by police as "very dangerous" insurgents.