Aircraft from a U.S.-led coalition accidentally bombed friendly Syrian forces fighting the Islamic State in northern Syria on Tuesday, killing 18, the Pentagon said Thursday. The bombing marks the worst confirmed friendly-fire incident in the nearly 3-year-old war against the terrorist group.

The coalition said in a statement that the airstrike was requested by “partnered forces” near the town of Tabqa who accidentally targeted a group of Kurdish and Arab fighters known as the Syrian Democratic Forces, or SDF. The partnered forces believed that the SDF’s position belonged to the Islamic State, the statement said.

According to a U.S. official with knowledge of the accidental strike, an SDF unit in close proximity to the Islamic State defense lines reported its location incorrectly. When other SDF forces saw what they thought were Islamic State fighters, they ordered a strike — but it turned out to be on the SDF fighters who had provided the wrong location.

“The coalition has been working with the SDF for more than 2 years and have conducted thousands of strikes,” the official said in an email. “This was a very dynamic situation. ISIS was fighting to hold their position; they continue to lose ground. The ground units and Coalition Forces involved in this strike are well experienced and communicate often. Unfortunately, this dynamic situation resulted in loss of detailed location understanding.”

The incident highlights the inherent difficulties of using local ground forces in conjunction with Western air power on a battlefield with a small U.S. presence. There are roughly 500 U.S. Special Operations forces working with Syrian Democratic Forces spread throughout north eastern Syria.

“The general leadership of SDF in coordination with international coalition will investigate the reasons behind the accident in order to prevent it happening again,” the Syrian Democratic Forces General Command said in a statement.

Last month, Syrian Democratic Forces along with U.S. Special Operations forces landed behind Islamic State lines and crossed the Euphrates River in an attempt to seize the town of Tabqa, as well as its strategic dam and airfield. The SDF is composed of various entities, including the Kurdish Peoples’ Protection Units, known as the YPG, and the Syrian Arab Coalition, a predominantly Arab group. It is unclear whether the two groups are working side by side or independently of each other.

“The Coalition is assessing the cause of the incident and will implement appropriate safeguards to prevent similar incidents in the future,” the Pentagon statement said. Multiple nations, including Belgium, Denmark and Australia, participate in the air war against the Islamic State, and it is unclear whether any country besides the United States was involved in Tuesday’s errant strike.

Before this week’s incident, U.S.-led forces had acknowledged two friendly-fire events during the war against the Islamic State. In December 2015, nine Iraqi soldiers in Fallujah were accidentally killed by U.S.-led aircraft, and in January 2016 nine Shiite militiamen fighting near Tikrit were bombed by an Iraqi drone.