Afghan security forces have ambushed a group of eight fighters during a seven-hour gun battle in the capital, Kabul.

Three cars full of explosives and ammunition were recovered in Thursday's gun battle, which ended with five of the fighters dead.

Afghan authorities said the ambush on a compound east of Kabul came as they thwarted a planned attack by the group in the capital.

Soldiers from Afghanistan's intelligence agency, the National Directorate of Security (NDS), launched the raid in darkness, entering a building about an hour after midnight in Kabul's Pul-e-Charkhi district which the fighters were using as a base.

"They aimed to enter a building in Kabul and launch a combined attack on security forces, government offices or offices belonging to foreigners," an NDS spokesman told the Reuters news agency.

Afghan security forces claimed the fighters were loyal to the Taliban, however, the group issued a statement denying that Thursday's operation was against their fighters.

Taliban fighters had previously launched an attack in central Kabul on April 15, occupying a high-rise construction site and pounding the city's diplomatic and business centre with rocket-propelled grenades and small-arms fire until they were killed.

On June 22, Afghan security forces fought a day-long battle with fighters after a Taliban attack on a lakeside hotel on the outskirts of Kabul.

But security forces and NATO-led foreign troops say the sporadic attacks do not point to weaknesses in Afghan forces and intelligence ahead of a withdrawal by most foreign combat troops to be completed by 2014.

Source: Agencies