KABUL - An Afghan border police officer opened fire on U.S. troops during a training mission in eastern Afghanistan on Monday, killing six of them in one of the worst such attacks in the past year, according to Afghan and NATO officials.

The shooting occurred along the border with Pakistan in the Pachir Wagam district of Nangarhar province at a facility to train Afghan security forces, according to Ahmad Abdulzai, a spokesman for the provincial governor. A senior police official said the shooter had been recruited into the border police two years ago.

"I think the Taliban has worked on him," the official said.

The Taliban issued a statement praising the police officer, whom the group identified as Izzatullah, for the killings. The group said the man "joined the police force of stooge regime in pursuit of an opportunity to eliminate any number of U.S.-NATO invaders until he got one today."

A statement by NATO forces did not identify the nationality of the six service members slain, but Afghan officials said they were American. The statement said the shooter was also killed and that an investigation team has been dispatched to look into the killings.

The incident is the latest in a series of killings of NATO troops by Afghan security forces and demonstrates the risks involved in the intense effort to recruit and field tens of thousands of new Afghan soldiers and police. The killings have raised troubling questions about the degree to which insurgents have infiltrated the Afghan security forces and pose a threat to NATO forces that have made training one of the most important goals of the war.

U.S. and Afghan officials have regularly said they do not believe insurgent infiltration is widespread in the Afghan security forces. But the killings have persisted, with at least five such attacks in the past 13 months.

In July, an Afghan soldier shot dead two U.S. civilian trainers in northern Afghanistan. That same month, an Afghan soldier attacked British soldiers in southern Afghanistan, killing three of them. A police officer last November also killed five British troops in southern Afghanistan.

The Afghan security forces have expanded rapidly in the past year amid an intense recruiting effort. As of September, there were more than 117,000 Afghans in the police force, up 24 percent from last November, and there were 138,000 soldiers, an increase of 42 percent over the same period, according to NATO statistics.

Recruiting has been notoriously difficult among ethnic Pashtuns in southern Afghanistan, the heartland of the Taliban. While the percentage of Pashtuns in the security forces is roughly aligned with the percentage of Pashtuns in the overall population, southern Pashtuns are vastly underrepresented. Such reticence to join the government forces has made it difficult to field soldiers and police who represent those living in the most violent parts of Afghanistan. The vast majority of Taliban members are Pashtun.

U.S. and Afghan officials say the new recruits are rigorously vetted. Any new recruit must undergo biometric registration to test against insurgent databases and have two representatives from their area vouch for them, as well as someone from the local government, said Col. Ahmad Feda Wakhil, the head of training for the Afghan National Police.

The Afghan security forces will often not recruit from volatile areas, particularly if the local councils cannot guarantee the trustworthiness of their men, he said. As of earlier this year, the Afghan police had not been recruiting from parts of Helmand province, he said.

Now that President Hamid Karzai and NATO countries have agreed to the goal of full Afghan security control by 2014, the training mission has become the clearest path to an exit from combat in Afghanistan for international forces. U.S. soldiers have little choice but to work alongside Afghan security forces, despite the risk.

Special correspondent Hamdard reported from Kabul.