Editor's note: Peter Bergen is CNN's national security analyst, a director at the New America Foundation and the author of "Manhunt: The Ten-Year Search for bin Laden -- From 9/11 to Abbottabad." Bailey Cahall is a research associate at the New America Foundation.
(CNN) -- In an attack orchestrated by a Pakistani Taliban commander, around 250 prisoners, most of them militants, were freed this week at the central prison in Dera Ismail Khan in northwestern Pakistan.
The commander, Adnan Rashid, had been freed a year earlier, this time at the central jail in Bannu, where 150 Taliban fighters stormed the facility and released nearly 400 prisoners -- Pakistan's largest jailbreak.
Both prison breaks happened in the stronghold of the Pakistani Taliban, Khyber Pakhtunkhwa province, which borders North and South Waziristan, and both were conducted with a high degree of sophistication.
This week's attack unfolded in multiple stages, beginning with cutting the prison's electricity, detonating bombs that had been planted around the facility to breach its external wall, and ambushing the security forces that rushed to the scene.
Once the militants overwhelmed the guards, they used loudspeakers to contact and locate specific prisoners, freeing them from their cells with hand grenades. At least 13 people died in the attack. Pakistani authorities launched a search operation for the missing prisoners, but few have been recaptured. The others have simply melted away into the mountains.
Jihadist militants have been breaking people out of prison across the Middle East and South Asia for years, some with significant consequences for the United States and its allies.
A 2006 prison break in the Yemeni capital, Sanaa, led to the creation of al Qaeda in the Arabian Peninsula, one of al Qaeda's most virulent affiliates, the one that recruited the "underwear bomber" who nearly brought down Northwest Airlines Flight 253 over Detroit on Christmas Day 2009.
During the 2006 prison break, 23 inmates escaped through a 460-foot tunnel into a nearby mosque. Two of the escapees went on to become the leader and deputy leader of al Qaeda in the Arabian Peninsula.
In 2008 and again in 2011, the Afghan Taliban led attacks on the Sarposa prison in Kandahar in southern Afghanistan that freed an astounding number of militants, around 1,700.
Like the prison attacks by the Taliban in Pakistan, the Kandahar plots showed sophisticated planning. In the aftermath of the 2011 breach, Afghan officials discovered an intricate network of tunnels under the jail, equipped with electrical and ventilation systems.
But perhaps no group has made prison breaks an organizational focus more than al Qaeda in Iraq. On July 21, 2012, Abu Bakr al-Baghdadi, al Qaeda in Iraq's leader, announced the "Breaking the Walls" campaign, a yearlong effort to release his group's prisoners.
According to a count by the Institute for the Study of War, since al-Baghdadi's announcement, al Qaeda in Iraq has conducted assaults on seven major prisons.
Earlier this month, hundreds of prisoners, including senior members of al Qaeda, escaped from Iraq's Abu Ghraib jail on the outskirts of Baghdad following a military-style assault on the prison. Al Qaeda's Iraqi affiliate claimed responsibility for that attack.
Elsewhere in the Middle East, a prison riot and an attack launched from outside Al-Kuifiya prison in Benghazi, Libya, freed more than 1,000 inmates Saturday.
Although it doesn't appear that groups such as the Taliban and al Qaeda are coordinating strategies in freeing their fellow militants, it is likely that they are inspiring each other with every successful, and well-publicized, prison break.
The attacks are generally well-organized and often free significant numbers of inmates, refreshing the militant groups' ranks, and each successful prison break is a propaganda coup.
Insiders assist in varying degrees in these different prison breaks, but the militants are also exploiting the countries' inadequate correctional systems. Many of these prison facilities where convicts have escaped en masse were meant to house criminals, not terrorists, and they often lack the fortification needed to fend off armed assaults.
Security concerns regarding prison facilities are part of the reason that 86 Guantanamo Bay detainees who were cleared for transfer into the custody of their home countries three years ago still remain in jail at Guantanamo.
Fifty-six of those men are from Yemen, which has a notoriously porous prison system. The recent prison breaks in Pakistan, Iraq and Libya are reminders that the United States needs to do more to strengthen high security prisons in countries such as Yemen if there is any hope that prisoners who are cleared for transfer -- but have been languishing at Guantanamo for many years -- are ever to return home.