More than 300 prisoners are still at large after an attack by ISIS militants on a prison in the eastern Afghan city of Jalalabad, the governor's spokesman said on Monday. Attaullah Khugyani, spokesman for the governor of Nangarhar province, said that of the 1,793 prisoners, just over 1,025 had tried to escape and been recaptured, and 430 had remained inside the prison. "The rest are missing," he said. He said civilians, prisoners and members of security forces were among the victims. "Eight gunmen were killed as some areas, where the attackers had taken positions, were cleared," he said. The attack highlighted the challenges ahead for Afghanistan, even as US and Nato forces begin to withdraw following America striking a peace deal with the Taliban. As security forces swept through the prison, they found the bodies of two Taliban prisoners apparently killed by the Islamic State group, showing the tensions between the two militant factions battling each other in eastern Afghanistan. The attack began on Sunday night and clashes between gunmen and security forces continued on Monday, with at least 29 people killed and more than 50 wounded, he said. Mr Khugyani said the dead include prisoners. The assault began with a car bomb detonated at the entrance to the prison, and there were numerous other blasts heard as the ISIS gunmen opened fire on security guards. Two Nangarhar province officials said at least five civilians were killed, and around 40 wounded during the initial attack and the gun battle through the night, as Afghan special forces arrived to support the police. During the ensuing chaos, police were forced to divert to try to recapture the prisoners that had escaped, according to the officials. ISIS claimed responsibility for the attack. Some 130 kilometres east of Kabul, Jalalabad lies on the highway leading to the Khyber Pass and the Pakistani city of Peshawar. A United Nations report last month estimated there are around 2,200 ISIS members in Afghanistan, and that while the group is in territorial retreat and its leadership has been depleted, it remains capable of carrying out high-profile attacks. The raid came a day after the country's intelligence agency announced the killing of a top ISIS commander near Jalalabad. Assadullah Orakzai was involved in several deadly attacks against Afghan security forces, the National Director of Security said Saturday. Nangarhar province has seen some deadly ISIS attacks this year including a May 12 suicide bomb that killed 32 mourners at a funeral for a police commander. The ISIS attacks continue despite government officials claiming last year that the group's Afghan branch had been completely defeated in Nangarhar. Some local officials have, however, cautioned that elements of the group remained. The province provided IS with its first foothold in the country in 2015.