The assault comes one day after 34 people were killed at an educational centre in the capital.

Two gunmen were killed after a seven-hour battle with the security forces following an attack on an intelligence service centre in Afghanistan‘s capital.

The attack, claimed by the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group, on Thursday morning started at approximately 10:15am local time (05:45GMT) at the training centre overseen by the National Security Directorate in the city’s Qala-e-Wazir area.

There are no details on civilian casualty figures yet.

A Kabul police spokesperson told Al Jazeera the attackers were shooting from a construction site opposite the centre.

Afghan Special Forces, backed by advisers from the NATO-led Resolute Support mission, kept the attackers in a standoff before killing the the two attackers were killed, said officials.

Thursday’s violence follows a suicide attack at a school in Kabul which killed at least 34 people, and a series of assaults by Taliban fighters across the country, including a days-long assault on the eastern city of Ghazni.

The latest fighting has raised questions over prospects for peace talks between the Taliban and the Western-backed government ahead of next week’s Eid al-Adha, a major annual Muslim festival.

The last Eid truce, which saw unarmed Taliban fighters mingling with soldiers and police in Kabul and other cities, offered a rare glimpse of peace and Taliban officials say they have held preliminary meetings with US diplomats.

But officials have also said they are bracing for more violence with the approach of parliamentary elections in October.