KABUL (Reuters) - Gunmen armed with assault rifles and grenade launchers stormed the heavily fortified headquarters of the Afghan interior ministry on Wednesday, battling security forces for more than two hours in the latest attack on the capital Kabul.

A car bomb was detonated at the entrance of the ministry to launch the attack and then several gunmen managed to get inside the compound, said a senior police official.

Najib Danish, the ministry spokesman, confirmed the attack was carried out by a group of 10 militants and at least one policeman was killed and five were wounded.

A senior ministry official said one attacker blew himself up inside the compound and another was resisting from a watchtower as a plume of dust and smoke rose over the sprawling site.

Officials inside the ministry said the attackers could not breach key buildings as they are located far from the main entrance and there is a wide flat space inside the compound, helping Afghan forces to subdue the attack quickly.

Islamic State claimed responsibility for the attack, the latest in a series in Kabul this year that has killed and wounded hundreds of people, despite repeated official pledges to improve security in the capital.

Last month, two explosions in Kabul killed at least 26 people, including nine journalists who had arrived to report on an initial blast and were targeted by a suicide bomber which was claimed by the Islamic State fighters.

A week before that, 60 people were killed and more than 100 wounded when a suicide bomber blew himself up outside a voter registration center in the city.

Islamic State has claimed many attacks in Kabul but Afghan security officials doubt the claims and say many of the attacks are much more likely to be the work of the Haqqani network, a group affiliated with the Taliban which has proven expertise in mounting urban attacks.

Slideshow ( 5 images )

The attacks underline a worsening security situation ahead of parliamentary and district council elections scheduled for Oct. 20. The Taliban have threatened to attack voter registration centers.

Security in and around Kabul has been on high alert in recent days with more checkpoints and patrols as the government warned of “complex attacks” by the Taliban on the government or foreign installations in coming weeks.

Provincial cities have also been hit as the Taliban, seeking to reimpose hardline Islamic rule, have stepped up fighting across the country since they announced the beginning of their annual spring offensive in April.