JALALABAD, Afghanistan — Militants attacked a major prison in eastern Afghanistan on Sunday, detonating a car bomb and waging a gun battle against guards for hours, as dozens of inmates managed to escape, Afghan officials said.
The attack in the city of Jalalabad came at a time when the issue of releasing insurgent fighters from prison has moved to the forefront of efforts to strike a peace deal and end Afghanistan’s long war.
Disagreement over the last batch of a prisoner release has delayed the next steps of an agreement reached in February between the United States and the Taliban, and the start of direct talks between the Taliban and the Afghan government.
But other militant groups that are also fighting the government were not party to that agreement, and one of those, the Islamic State, claimed responsibility for the attack on Sunday through its Amaq news agency.
Zabihullah Mujahid, a spokesman for the Taliban, said the group was not behind the assault on the prison, which holds about 1,500 inmates.
Whoever the attackers were, they could put a strain on a fragile peace process that has broken down several times, often with renewed violence.
The attack came during the final hours of a three-day cease-fire between the Taliban and the Afghan government for the Muslim festival of Eid al-Adha. Afghan officials said that violence during the cease-fire had dropped significantly, with fewer than a dozen incidents reported over the first two days.
At least two people were killed and 24 others wounded in the prison attack, according to Attaullah Khogyani, a spokesman for the government of Nangarhar Province, and the gunfight was still underway Sunday night.
Insurgents have repeatedly tried to stage prison breaks to free their compatriots during the war, sometimes successfully.
Nangarhar has been a stronghold of the Islamic State in Afghanistan. Intense operations by Afghan forces, often backed by American air power, significantly shrank the group’s presence. Afghan officials said Saturday that they had killed a senior leader of the group in the province.
On Sunday, militants exploded a car bomb at the prison entrance in Jalalabad before engaging in a gunfight with guards. One official said militants were holed up in towers around the prison, while fighting was reported inside.
The United States-Taliban deal called for the Afghan government to free 5,000 Taliban prisoners in exchange for 1,000 Taliban-held members of the Afghan security forces.
The swap was supposed to take place early this year over the course of 10 days, after which the Taliban and the government were expected to sit for direct negotiations.
The Afghan government at first resisted the prisoner release, and then gave in to a phased release under much pressure from the Trump administration. More recently, President Ashraf Ghani said he would not release the last 400 of the 5,000 people on a list provided by the Taliban, as they are accused of serious crimes.
While the Taliban have completed the release of the 1,000 prisoners they had committed to, Mr. Ghani has offered a compromise: He is releasing 500 other Taliban members instead of the 400 on the list presented by the insurgents, and he is calling a council of elders from across Afghanistan to consult on whether to free the 400 accused of grave crimes as well. The grand consultation, called a Loya Jirga, is expected to happen this month.
It was not clear whether Mr. Ghani’s compromise was acceptable to the Taliban to open the way for direct negotiations, expected around Aug. 10.
Zabihullah Ghazi reported from Jalalabad, and Mujib Mashal from Kabul, Afghanistan.