(AP) -- A gunman wearing an Afghan police officer's uniform fired at U.S. and Afghan forces in eastern Afghanistan on Monday, killing two American troops, according to the military.
The attack also killed two Afghan policemen, and the shooter was killed as well.
So-called "insider attacks" have plunged so far this year compared with last. There have been three attacks so far this year, killing four troops. Last year, 47 attacks killed 62 people. The military credits better vetting of Afghan recruits and greater vigilance about the threat with helping reduce the number of attacks.
Outside of Kabul, meanwhile, U.S. troops fired on a truck approaching their military convoy, killing two Afghan men inside it.
However, the incident in the eastern Wardak province and others like it have threatened to undermine their alliance at a time when they need to work increasingly close together in order to hand over responsibility as planned next year.
The attack also comes a day after the expiration of the Afghan president's deadline for U.S. special forces to withdraw from the province following accusations of abuse by those under their command.
U.S. officials have said that they are working with Afghan counterparts on coming up with a solution that will answer President Hamid Karzai's concerns and maintain security in Wardak. The majority of U.S. troops in Wardak are special operations forces.
In Monday's attack, an Afghan police officer stood up in the back of a police pickup truck, grabbed hold of a machine gun and started firing at the U.S. special operations forces and Afghan policemen in the police compound in Jalrez district, said the province's Deputy Police Chief Abdul Razaq Koraishi.
The assailant killed two Afghan policemen and wounded four, including the district police chief, before he was gunned down, Koraishi said.
The U.S. military said in a statement that two American service members were killed in the shooting.
Five Afghan police officers were being held for questioning by the Americans, Koraishi said.
Karzai had ordered U.S. special operations forces to leave Wardak province, which lies just outside the Afghan capital, Kabul, because of allegations that Afghans working with the commandos were involved in abusive behavior. He gave them two weeks to leave, and the deadline expired Sunday.
In the convoy shooting, U.S. forces spokesman Jamie Graybeal said the Afghan driver failed to heed instructions to stop as his truck came close to the American convoy near Kabul.
"The convoy took appropriate measures to protect themselves and engaged the vehicle, killing two individuals and injuring one," Graybeal said in an email. He said an assessment is underway.
Associated Press video shows a U.S. major cursing out one of his soldiers and slapping him over the head with his cap as Afghans pulled dead bodies from the truck. In the video, the major appears to be upbraiding the soldier for not using a laser to warn the approaching truck.
The two dead men were employees of a company that repairs police vehicles, said Interior Ministry spokesman Sediq Sediqi. Another man was wounded in the shooting, said Col. Mohammad Alim, the police commander overseeing Kabul highways.