The downing of a pair of NATO (search) peacekeeping helicopters that killed 17 Spanish troops was an accident, a top Afghan defense ministry official said Wednesday after visiting the crash site with Spain's (search) defense minister.

"What is clear for us is that there was definitely no attack by militants," Maj. Gen. Shar Mohammed Karimi told The Associated Press. "We suspect one of the helicopters may have accidentally hit the other while flying. The other possibility is that the choppers had technical problems."

Spanish Defense Minister Jose Bono said Tuesday in Madrid before flying to Afghanistan (search) that he was not ruling out hostile fire as a possible cause.

A spokesman for NATO's International Security Assistance Force in Kabul, Maj. Andrew Elmes, said, "Investigators are at the site, but there is no new information on the cause of the crash."

On Tuesday, he said it was believed to have been an accident and not due to rebel activity.

The crash was the biggest loss of life yet for the NATO force inside Afghanistan. Five Spanish soldiers were also wounded. They were in stable conditions in an ISAF hospital in Herat, officials said.

Bono flew into the western city of Herat on Wednesday before traveling to the crash site south of the city. Some 20 Spanish military personnel also arrived to investigate the cause of the crash and to begin identifying the remains of 17 Spanish troops killed in the disaster.

Afghan President Hamid Karzai said in a statement Tuesday that the crash was caused by a sandstorm. But Afghan army commander Abdul Wahab Walizada, whose troops provided security in the area, said the weather was fine and that the rotor blades of one of the helicopters clipped the other aircraft after they came too close.

Walizada said the wreckage of one helicopter was completely burned, while the other appeared severely damaged, but had not caught fire.

Dozens of Spanish soldiers cordoned off the area around the crash site and did not allow were media to get close to the wreckage Wednesday.

The 17 dead — 12 soldiers and five crew — were on the first chopper that crashed, Elmes said. The five injured were on the second, which made a "hard landing," he said. Twelve other troops on the aircraft walked away unscathed.

The accident was a setback to NATO's 10,000-strong force in Afghanistan as it reinforces security ahead of Sept. 18 parliamentary elections. Elmes said both choppers were on a training mission to support the vote — the next key step in the country's path to democracy after two decades of war.

Taliban-led rebels have stepped up attacks in the past six months and have vowed to sabotage the polls. But they focus their activities in the east and south, and rarely strike in Herat and other areas in the west, where the crash occurred.