BRUSSELS — The leaders of France and Germany sharply criticized Turkey’s escalating offensive against Kurdish positions in Syria on Sunday, called for a halt, and warned of painful consequences for Turkey and for their own security as the United States accelerated its pullout from Syria.

French President Emmanuel Macron met with German Chancellor Angela Merkel in Paris and then convened an emergency meeting of his security advisers Sunday evening.

The conflagration held direct and immediate risks for Europe, some of whose citizens had been held inside prison camps for alleged Islamic State fighters and their families. Those camps had been guarded by Kurdish fighting groups now under attack by Turkey.

France and Britain have special forces deployed in Syria, leaving their troops potentially exposed amid the fighting.

The developments set up another wedge between President Trump and Europe on security issues, with Europeans increasingly fearing that the sudden move from the White House to clear the way for Turkey’s assault has led to an immediate security threat on their doorstep.

“We have spoken both with President Trump and with [Turkish] President Erdogan, and we sent the clear message of our common will that this offensive stops,” Macron said.

Merkel said that she had spoken for an hour on Sunday to President Recep Tayyip Erdogan.

“This offensive must end, because the humanitarian consequences are grave and because the danger of the Islamic State becoming stronger is very significant,” Merkel said, alongside Macron. “We cannot further accept this situation against the Kurds. Another solution must absolutely be found.”

The leaders stopped short of direct criticism of Trump, leveling their public anger at the Turkish leader instead.

British Prime Minister Boris Johnson expressed similar concerns to Erdogan in a Saturday evening phone call, Johnson’s office said.

Britain does not comment on deployments of its special forces.

French leaders have not publicly discussed the status of their troops in Syria since the assault started last week, but they have previously said that if the United States fully pulls out of Syria, they will have to do so, as well.

France, Germany, Italy, Norway, the Netherlands and others halted arms exports to Turkey in response to the escalating conflict, and European Union foreign ministers planned to discuss a further response Monday at a previously scheduled meeting in Luxembourg.

European countries have been depending on Turkey to prevent refugees from the Syrian conflict from crossing over into the European Union. Last week, Erdogan threatened to allow a wave of refugees into Europe if any European country condemned his actions in Syria.

The fighting also threatened to exacerbate rifts within the NATO military alliance, of which Turkey is a member. European countries are now at odds with Turkey for carrying out the assault and the United States for allowing it to happen after a phone call last week between Trump and Erdogan.

“The Turks are a NATO partner, and NATO is an alliance based on values,” German Defense Minister Annegret Kramp-Karrenbauer told a party gathering Sunday. “If there are indications that Turkey is really planning to stay in northern Syria as a kind of occupying force, then there must be a clear answer from us. That will not do.”

Some European policymakers said privately that Trump’s decision to stand by as the assault on the Kurds progressed was causing broader worry about the value of U.S. security guarantees. Kurdish fighting groups in Syria have been the U.S. military’s staunchest ally in combating the Islamic State, but Trump has done little to defend them against Erdogan.

“To say this is the most comfortable situation would be lying, even according to political standards,” said a senior European diplomat, speaking on the condition of anonymity for fear of further stirring conflict with the White House.

“The public is asking, ‘If you’re supposedly the allies of the U.S., like the Kurds, what’s the guarantee it doesn’t happen with formal allies, or legally binding allies?’ ” 

European policymakers have been debating since early this year about whether to repatriate E.U. citizens who joined the Islamic State and traveled to Syria and Iraq. The answer, until now, has been no — politicians feared the political consequences of taking people home, and some security policymakers thought it was safer to keep them inside the camps in Syria. 

Now, though, some might be starting to escape, raising the prospect of those citizens coming home on their own and posing a potential security threat to Europe.

“I don’t know today the people who left this camp,” Sibeth Ndiaye, a spokeswoman for Macron, told the France 3 broadcaster Sunday. “Obviously, since the beginning of this armed operation, it was a French concern. Because we indeed have French jihadists whom we always believed must be put on trial on the ground, where they committed their acts.

“We are worried about what could happen. So that’s why we want Turkey to swiftly end its intervention,” she said.

Quentin Ariès contributed to this report.