ISIS has claimed responsibility for an attack that killed at least three people in the Afghan city of Jalalabad.
Armed men stormed a prison in Jalalabad, the capital of eastern Nangahar province, after a car bomb was detonated.
The blast wounded 24 and shattered the relative calm of a ceasefire across the country, an official said.
ISIS claimed responsibility for the attack on its Amaq news agency on Sunday
The gun battle between Afghan security forces and insurgents in Jalalabad continued into Sunday evening.
Scores of prisoners reportedly escaped in the fighting which followed the initial explosion.
Casualties were likely to rise, said Attaullah Khogyani, spokesman for the provincial governor.
The Taliban and local ISIS affiliate, which is based in Nangahar, are active in eastern Afghanistan.
Sohrab Qaderi, a provincial council member in Jalalabad, said a huge car bomb explosion was followed by at least two smaller bomb blasts outside the government-run prison.
“At least 20 people were injured in the ongoing clashes,” Mr Qaderi said.
On Saturday, the Afghan intelligence agency said a senior ISIS commander was killed by Afghan special forces near Jalalabad.
“We have a ceasefire and are not involved in any of these attacks anywhere in the country,” the Taliban’s political spokesman, Suhail Shaheen, told AP.
But Mr Shaheen said he was not aware of the details of the Jalalabad attack.
The Taliban also denied involvement in a suicide bombing in the eastern Logar province late on Thursday, which killed at least nine people and wounded at least 40, authorities said.
Afghanistan has had a recent surge in violence, with most attacks claimed by the local ISIS affiliate.
The Taliban declared a three-day ceasefire starting on Friday for Eid Al Adha.
President Ashraf Ghani and the Taliban have indicated that long-delayed peace negotiations could begin immediately after the Eid festival.
Hundreds of militant prisoners were released to try to bring the peace talks closer.
Under a deal signed by the Taliban and the US in February, the intra-Afghan talks were scheduled to start in March.
But they were delayed because of political infighting in Kabul and as the contentious prisoner swap dragged on.
The deal stated that Kabul would free about 5,000 Taliban prisoners in return for 1,000 Afghan security personnel held by the Taliban.
The National Security Council said yesterday that 300 more Taliban prisoners had been released since Friday, taking the total so far to about 4,900.
Authorities, however, refused to free hundreds of inmates named by the insurgents but who were accused of serious crimes.
The Taliban says it has freed all 1,000 Afghan prisoners it had pledged to release in the deal.