Security forces in Afghanistan say they have averted a mass attack by the Taliban following a seven-hour gun battle in Kabul.

Authorities say they killed at least eight insurgents during an early morning raid in the capital.

Afghanistan's intelligence agency, the National Directorate of Security (NDS), launched the attack in the early hours on a building being used as a base by the Taliban in the Pul-e Charkhi district of the city.

An NDS spokesman said: "We have already killed eight insurgents and also seized explosives. They aimed to enter a building in Kabul and launch a combined attack on security forces, government offices or offices belonging to foreigners."

The Taliban have issued a statement denying their fighters came under attack, although they often play down such defeats.

It follows two major attacks in Kabul in the last few months.

Afghan security forces and NATO-led soldiers deny the operations highlight any weaknesses ahead of the withdrawal by most foreign troops by 2014.