KABUL, Afghanistan  Six American service members who were training Afghan Border Police officers were killed on Monday when one of the trainees turned his gun on them, the Pentagon said.

The shooting occurred in the Pachir-Wa-Agam district of Nangarhar Province, which borders Pakistan and includes the Tora Bora mountains and the cave complex that was one of the last hide-outs of Al Qaeda in Afghanistan after the invasion by American and allied forces in 2001.

NATO officials and Gen. Aminullah Amarkhail, the Afghan Border Police commander for Nangarhar, initially reported the episode without providing the nationality of those killed.

A Pentagon official in Washington later confirmed that all six were Americans, but did not provide any other details. A NATO spokeswoman, Lt. Col. Regina Winchester, said an investigation was under way.