Image copyright EPA Image caption Black smoke could be seen rising from the scene of the attack

Militants have attacked a midwife training centre in Afghanistan, killing two guards and a driver and injuring at least eight other people.

The attackers set off explosives and fired gunshots at the centre in Jalalabad, Nangarhar province.

Afghan security forces regained control after a gunfight lasting six hours.

No group has yet said it was behind the attack, although Islamic State militants have claimed several recent attacks in the eastern province.

The Taliban have denied any involvement.

The attack began at around 11:30 local time (07:00 GMT) and ended around 18:00.

The attackers placed explosive devices in the street near the complex, an eyewitness told AFP.

Attaullah Khogyani, Nangarhar spokesman for the provincial governor, told the BBC one of the assailants died when he detonated an explosive vest, while the other was killed by security forces.

Image copyright Reuters Image caption Afghan police inspect the damaged centre

In total, 61 midwives and two children were rescue from the compound, Mr Khogyani added.

However, two guards and one driver were killed in the attack, while three members of the security forces, three civilians and two centre employees were hurt.

The centre offers two-year midwifery training courses for women from the province.

It is not clear why the midwife training centre was targeted.

However, militants often choose official buildings and medical facilities for their attacks, and many Afghans are opposed to unmarried women working outside their homes.

More than 50% of births in Afghanistan take place without a trained midwife.

The country has one of the highest maternal mortality rates in the world - 396 deaths per 100,000 live births - well above the global average of 216 deaths.