- five of them United Nations foreign staffers. The gunmen also died.
The comments by Afghan intelligence chief, Amrullah Saleh, are likely to intensify criticism of the security provided to employees of the world body working in Afghanistan. The United Nations has already said that it took too long for Afghan police and NATO troops to respond to the attack.
Saleh said eight men have been arrested who were involved in planning the attack, including an imam who housed the assailants and was captured as he landed by plane in Saudi Arabia. The others were arrested in Afghanistan.
"We were aware of the attack in Kabul city one week before," Saleh said. "Based on our information were able to prevent a part of the attack, by arresting of some of their men and disrupting their plans."
He did not say how specific the information was or what other plans were derailed.
The intelligence reports had suggested the attack would happen either after 7 a.m. or around 3 p.m., so police beefed up checkpoints and security during those times but not overnight, Saleh said.
The militants "used this opportunity and started their attack sooner than that time," he said.
United Nations security guards who were living in the house held off the gunmen for at least an hour on their own before security forces showed up, U.N. Secretary-General Ban Ki-moon said Friday.
Ban said the U.N. security team "repeatedly called for help from both Afghanistan government forces and other international partners."
U.N. spokeswoman Michele Montas said the U.N. was demanding an explanation.
Saleh declined to answer questions about how quickly security forces responded.
Some of the eight arrested were caught after the attack, Saleh said, including the imam who was caught as he landed at the airport in Jeddah, Saudi Arabia, on Thursday.
By Associated Press Writer Rahim Faiez