Several terrorists stormed a midwife training centre in an ongoing attack in eastern Afghanistan today, leaving at least three people wounded, officials said, as plumes of smoke were seen rising above the compound.

Afghan security forces have stormed the centre in Jalalabad, the capital of Nangarhar province, and sporadic gunfire could be heard from inside, witnesses and officials said.

There was no immediate claim of responsibility for the latest attack, but most of the recent assaults in the city have been carried out by the Islamic State group, which has a stronghold in Nangarhar.

"The Afghan security forces have cordoned off the area and... launched an operation to gun down the attackers," provincial governor spokesman Attaullah Khogyani said. Several midwives have been rescued, he added.

Provincial health department spokesman Inamullah Miakhil confirmed its midwife centre had been attacked. Three wounded civilians have been taken to a hospital, Khogyani said.

A witness in a nearby department said he heard several explosions and then saw three gunmen enter the street where the midwife centre is located.

Some of the security forces appeared to be dismantling several improvised explosive devices in the street, a witness said.

Jalalabad has been the scene of several attacks in recent months that have killed dozens, as US and Afghan forces continue offensive operations against IS and Taliban militants.

Government buildings are a common target for insurgents, including hospitals and medical facilities.

While it is not known why the gunmen targeted the midwife training centre, midwives have been attacked in the past for providing reproductive health services to women.

Islamist groups — and many ordinary Afghans — also oppose women working outside the home.

While thousands of women have been trained as midwives since the 2001 US-led invasion, Afghanistan still has one of the highest maternal and child mortality rates in the world.

The last major attack in Jalalabad happened on July 11 when gunmen raided an education department compound in the city, sparking an hours-long battle with security forces.

At least 11 people were killed in the attack. All were employees of the education department branch and included the director.

A suicide bomb attack claimed by IS on a crowd of Afghan Sikhs and Hindus in Jalalabad on July 1 killed at least 19 people and wounded 21.

The Taliban is Afghanistan's largest militant group and IS has a relatively small but potent presence, mainly in the east and north of the country.

It first emerged in Afghanistan in 2014 and quickly established a stronghold in Nangarhar.

Intensified aerial and ground operations against the militants have failed to dislodge them.