KABUL — Two U.S. troops were killed and six others were wounded in eastern Afghanistan on Saturday after a gunman wearing an Afghan military uniform ambushed a team of Americans and their Afghan colleagues, officials said.

Precise details remain unclear. U.S. military officials here announced the casualties in a brief statement, indicating that the names of those killed would not be released until after their families had been notified.

The incident, which occurred near the Pakistan border in the Sherzad district of Afghanistan’s Nangahar province, was under investigation, officials said. Those wounded were receiving medical treatment at a U.S. facility.

“Upon completing a key-leader engagement at the district center, current reports indicate an individual in an Afghan uniform opened fire on the combined U.S. and Afghan force with a machine gun,” Col. Sonny Leggett, a U.S. military spokesman, said in a statement.

Newsweek reported that nine Afghan soldiers also were killed in the attack, but Leggett’s statement made no mention of additional casualties.

Earlier Saturday, a member of Nangahar‘s provincial council, Mohammad Ajmal Omar, described the shootout as a possible insider attack.

Attacks perpetrated by militants who infiltrate Afghan military units have posed a long-standing threat to U.S. and Afghan forces, though such incidents have abated in recent years as the U.S. presence in Afghanistan has shrunken. The Taliban and factions linked to the Islamic State have footholds in the country’s east.

“We are still collecting information and the cause or motive behind the attack is unknown at this time,” Leggett said earlier Saturday.

The attack comes as formal peace talks between U.S. and Taliban negotiators remain hampered by the ongoing bloodshed. U.S. negotiators have demanded a reduction in violence before a deal can be signed.

Last month, a roadside bomb attack in Kandahar province killed two American service members and left two injured. The Taliban claimed responsibility.

Sharif Hassan in Kabul contributed to this report.