Taliban militants have launched an audacious attack on the DI Khan Central Jail in northwestern Pakistan freeing more than 240 prisoners.
At least 30 of the escaped detainees are believed to be hard-core insurgents.
The Taliban assault started about midnight on Monday (29 July) with huge explosions followed by gunfight with security forces.
Local reports suggest at least a dozen people were killed during the battle including six policemen.
The prison houses nearly 5,000 inmates, including 250 high-profile terrorists.
Up to 40 Taliban fighters, some in police uniform, were armed with rocket-propelled grenades and machine-guns, said officials. Suicide attacks were also reported by local media.
Security forces regained control of the prison following a six-hour gun battle with the insurgents. About 14 of the escaped prisoners were later recaptured.
"Militants have attacked the Central Prison. They are heavily armed and firing mortar shells," senior police official Sohail Khalid said.
The insurgents were heard shouting "God is great" and "Long live the Taliban", according to reports.
Police have launched a manhunt for the escaped prisoners and have imposed a curfew on the city.
"Right now some of the attackers are inside the jail and others have occupied two buildings outside. We are going to launch a major operation soon. The city has been sealed. The army is leading the operation," said the town's civil commissioner Mushtaq Jadoon.
Pakistan Taliban have claimed responsibility for the attack and said several of their men escaped.
Jadoon added, "The Taliban have loudspeakers and they are calling the names of their friends."
Reports say the prison had received a threatening letter from the militants warning of an impending attack.
The prison is located on the edge of Pakistan's tribal region, a safe haven for Taliban and al-Qaida militants.
This is the third major jailbreak in recent days. Iraq had witnessed a major similar incident when nearly 500 al-Qaida militants were set free followed by another prison break in Benghazi, Libya, during which nearly 1,200 inmates fled.