BEIRUT — Turkey slammed the Trump administration’s decision to supply Syrian Kurdish fighters with weapons against the Islamic State group and demanded Wednesday that it be reversed, heightening tensions between the NATO allies days before the Turkish leader heads to Washington for a meeting with President Trump.

President Recep Tayyip Erdogan said the fight against terrorism “should not be led with another terror organization” – a reference to the Syrian Kurdish militia, known as the YPG, which Turkey considers an extension of the decades-long Kurdish insurgency raging in its southeast. “We want to know that our allies will side with us and not with terror organizations,” he said.

The dispute could ignite more fighting between the two key U.S. allies in the battle against IS as Syrian Kurdish forces gear up for a major operation to drive the militants from their de facto capital, Raqqa.

Turkey, which has sent troops to northern Syrian in an effort to curtail Kurdish expansion along its borders, has for months tried to lobby Washington to cut off ties with the Kurds and work instead with Turkish-backed opposition fighters in the fight for Raqqa.

But the Kurdish-led Syrian Democratic Forces, of SDF, which has driven IS from much of northern Syria over the past two years with the help of U.S.-led airstrikes, are among the most effective ground forces battling the extremists. In announcing the decision on Tuesday to arm the Kurds, the Pentagon’s chief spokeswoman, Dana W. White, called the militia “the only force on the ground that can successfully seize Raqqa in the near future.”

On Wednesday, the SDF said it captured the country’s largest dam from the Islamic State group. The fighters, which are Kurdish-led but also include some Arab fighters, said they expelled the extremists from the Tabqa Dam and a nearby town, also called Tabqa.

It was the latest IS stronghold to fall to the Kurdish-led fighters as they advance toward Raqqa – the seat of the militants’ so-called caliphate along the Euphrates River. The fall of Tabqa leaves no other major urban settlements on the road to Raqqa, about 25 miles (40 kilometers) away.

Ilham Ahmed, a top official in the Syrian Democratic Forces’ political office, hailed the U.S. decision to provide heavier arms, saying it carries “political meaning” and would “legitimize” the Kurdish-led force.

Ankara says the Kurdish militia, which forms the backbone of the Syrian Democratic Forces, is an extension of the Kurdistan Worker’s Party, or PKK, which has been waging a decades-old insurgency in Turkey and is considered a terrorist group by Turkey, the U.S. and other Western countries.

Erdogan said he would take up the issue during a planned meeting with Trump on Tuesday.