Security forces in the Afghan capital have defused a truck bomb packed with nearly eight tonnes of explosives, the biggest of its kind discovered in the country.

Intelligence forces discovered the explosives in eastern Kabul, wired and ready for detonation, security officials said.

Five al-Qaeda linked Haqqani network insurgents were killed in a resulting firefight.

"This truck bomb could have destroyed an area around 1.5km [in radius]. Now can you imagine what kind of catastrophe this would be," Shafiqullah Tahiri, a spokesman for the National Directorate of Security, told a news conference.

After more than 11 years of war, insurgents are still able to strike strategic military targets and launch high-profile attacks in Kabul and elsewhere.

The truck bomb was discovered on Wednesday, two days after US Defence Secretary Chuck Hagel left the capital.

On the first full day of Mr Hagel's visit, a suicide bomber struck about 1km away from his morning meetings at a NATO facility.

Two Haqqani operatives were arrested during the night raid, and Tahiri said the militants had been planning to target a military facility in the capital.

There are several foreign and Afghan military bases in Kabul, housing thousands of soldiers.