The Islamic State (IS) group has said it was behind a high-profile attack on a central prison in the eastern Afghan city of Jalalabad that saw hundreds of prisoners try to flee.
The attack began on Sunday evening when car bombs were detonated at the prison’s entrance by gunmen.
It continued through the night and into Monday morning, with the IS militants battling security forces.
At least 21 people were killed, said a spokesman for Nangarhar province.
According to Attaullah Khogyani, 43 people were injured and taken to a regional hospital. He said three attackers had been killed but others were continuing to resist security forces from the top floor of a residential building.
The prison holds more than 1,700 inmates – most of them Taliban and IS fighters, a security source told the AFP news agency. It was not immediately clear if the attack had been staged to free specific prisoners from the complex.
The attack happened on the third and final day of a temporary ceasefire between the Afghan government and the Taliban, with hundreds of Taliban prisoners released in an effort to get peace talks moving between the two sides.
The Taliban – which is a staunch rival of IS – had earlier said it was not responsible for the attack.
Sunday’s attack came a day after Afghanistan’s intelligence agency announced that the country had killed a top IS commander, Assadullah Orakzai, near Jalalabad. Orakzai had allegedly been involved in several deadly attacks against Afghan security forces.
Nangarhar province was the Islamic State group’s first stronghold in Afghanistan. It still has a foothold there despite government officials claiming last year that the group’s local affiliate – known as Islamic State Khorasan – had been completely defeated in the province.
Nangarhar had already seen deadly attacks this year, including a 12 May suicide bomb that killed 32 mourners at a funeral for a police commander.