WASHINGTON — American and Czech forces are under investigation for the death of an Afghan commando who was beaten while in NATO custody in western Afghanistan, American and Afghan officials said, demonstrating the tensions that have grown among military forces after 17 years of war.

The commando, Wahidullah Khan, was accused of killing a Czech soldier last month in one of four deadly insider attacks this year by Afghan forces on NATO troops.

One American official said a team from the Army’s 7th Special Forces Group, which helped transfer Mr. Khan to the custody of Czech soldiers, has been withdrawn from Afghanistan as the investigation continues. It is not clear, however, if any American soldiers participated in the beating of Mr. Khan.

Col. Dave Butler, a spokesman for the American-led mission in Afghanistan, acknowledged the investigation but declined to provide details.