WASHINGTON — Russian aircraft mistakenly bombed Syrian Arab fighters who were being trained by the United States, the commander of the American-led operation in Iraq and Syria said Wednesday. American advisers were about three miles away when the Russian strike occurred.

The episode pointed to the risk of unintended clashes among the myriad forces operating on a fluid battlefield in Syria, as the American command looks toward the fight to retake Raqqa, the Islamic State’s de facto capital in the country.

Lt. Gen. Stephen Townsend, who commands the American-led task force that is fighting the militants in Iraq and Syria, said the strike by Russian and Syrian government planes led to casualties among the Syrian fighters, but he declined to say how many were hurt or if any were killed.

He added that the Russian attack appeared to have been a mistake: The Russian military thought it was bombing villages held by the Islamic State, also known as ISIS or ISIL, when in fact they were recently occupied by Syrian Arab fighters.