Officials say gun battle between attackers and security forces ends inside midwife training facility in Jalalabad.

Security forces have battled for hours a group of gunmen who stormed a medical training centre in eastern Afghanistan, in an attack that killed at least two people and wounded eight others, including five civilians, according to officials.

A series of explosions went off late on Saturday morning in Jalalabad, the capital of Nangarhar province, before the attackers rushed the school for trainee midwives. Afghan special forces arrived to confront them and heavy gunfire ensued.

After a battle lasting for about six hours, sending clouds of black smoke spiralling into the sky, all the attackers were dead, according to a statement by Attaullah Khogyani, the provincial government spokesman.

One of the attackers died early in the operation after detonating a suicide bomb, but a second held out for several hours before being killed by security forces, said Khogyani.

He put the death toll at three – two security guards and a driver – while Ghulam Sanyee Stanikzai, Nangarhar police chief, told AFP news agency that two people – a guard and a driver – were killed.

Eight people – five civilians and three police officers – were also wounded.

Al Jazeera’s Charlotte Bellis, reporting from Afghanistan’s capital, Kabul, said 69 people were inside the school, including midwives, teachers and students.

“There was some intelligence prior to the attack that gave them a bit of a heads up and they managed to get into safe rooms and secure themselves,” said Bellis.

She added that about halfway through the gun battle, special forces managed to extract 57 of the 69 people who were inside and the remaining 12 were also secured after the end of the operation.

{articleGUID}

Security forces appeared to be dismantling improvised explosive devices apparently planted in the street by the attackers.

No immediate claim of responsibility was made. The Taliban denied involvement in a WhatsApp message sent to reporters.

Provincial health department spokesman Inamullah Miakhil said 48 women from remote districts of the province were enrolled in the two-year midwifery course.

“We don’t know why the midwife centre came under attack,” Miakhil said.

Jalalabad has been rocked by a number of attacks within recent weeks.

At least 10 people were killed and another 10 wounded during an assault on a government building in the city on July 11, a day after 12 people were killed and four others hurt by a suicide bombing at a security checkpoint.

A separate suicide attack carried out by the Islamic State of Iraq and the Levant (ISIL, also known as ISIS), killed 19 people on July 1.

Both ISIL and the Taliban are active in Jalalabad with Afghan security forces struggling to battle both groups after the US and NATO officially concluded their combat mission in the country four years ago.

The Taliban is Afghanistan’s largest rebel group and ISIL has a relatively small, but potent presence, mainly in the east and north of the country. ISIL first emerged in Afghanistan in 2014 and quickly established a stronghold in Nangarhar province.

{articleGUID}

Last year, US President Donald Trump pledged the United States would continue fighting in Afghanistan in a bid to avoid the “predictable and unacceptable” results of a premature withdrawal from the country.

“A hasty withdrawal would create a vacuum that terrorists, including ISIS and al-Qaeda, would instantly fill,” Trump said.

Following Trump’s speech, US Defence Secretary James Mattis announced the deployment of 3,000 additional troops to Afghanistan – taking the overall tally to about 14,000 – where the US has been at war since 2001.