Slights and barbs have marred relations between France's Emmanuel Macron and Turkey's Tayyip Erdogan for years, but the row over cartoons of the Prophet Mohammad has dragged them to a new low which could have more lasting consequences.
Officials on both sides describe a series of behind-the-scenes frosty exchanges and grudges between the two leaders going back years, long before the row of the past few weeks.
But if they cannot find a way to mend bridges, momentum is likely to build for a proposal, driven by France, for European Union sanctions on Turkey's already-fragile economy, according to Turkish analyst Sinan Ulgen.
"Neither Erdogan in Turkey nor Macron in France will step back," said Ulgen, head of the Istanbul-based Centre for Economics and Foreign Policy Studies think tank.
A French official familiar with policy towards Turkey said that in the light of the events of the past few weeks: "The question of sanctions is going to be raised."
EU leaders have already said that if Turkey fails to de-escalate tensions in the eastern Mediterranean by Dec. 10, sanctions would follow, though there is no draft proposal yet.
The latest dispute flared after a French teacher who showed pupils cartoons of the Prophet published in the French satirical weekly Charlie Hebdo was beheaded in France last month.
The French government, backed by many citizens, saw it as an attack on freedom of speech. Macron vowed to redouble efforts to stop conservative Islamic beliefs subverting French values.
Erdogan accused Macron of an anti-Islamic agenda and said he needed a mental health check. Western countries mocking Islam, he said, want to "relaunch the Crusades".
At root, Franco-Turkish ties soured because of rival strategic interests, analysts and officials say.
Ankara has growing influence in Syria, north Africa and the eastern Mediterranean, while Macron is the most outspoken defender of European interests in those places.
The rivalry has spilled into personal clashes before.
In August 2017, three months after he became president, Macron told an interviewer that having to talk to Erdogan was one reason being head of state was not as "cool" as people thought.
The comment caused "big disappointment and shock" in Erdogan's entourage, said one senior Turkish official.
"The president chose to directly convey his discontent over the comment to Macron himself," the official said.
Then, in March 2018, Macron met a delegation including the Syrian Kurdish YPG, a group designated by Turkey as a terrorist organisation but viewed by Western powers as an ally against Islamic State in Syria.
Erdogan publicly accused France of abetting terrorism. A source close to the Turkish leader said Macron's stance on the Kurds "causes tensions both in some face-to-face meetings and phone calls."
French officials grew frustrated by Turkey's actions in Syria, accusing it of backing radical Islamists among the rebels fighting President Bashar al-Assad, a charge Ankara denied.
When they objected, French officials said, Turkey hinted it could send Syrian refugees toward Europe's borders, jeopardising a deal with the EU to stem the flow of migrants into Europe in return for billions of euros in aid.
Erdogan repeatedly threatened, in public speeches, to "open the gates" for Syrian refugees. A second French official said Macron's team viewed such threats as attempted blackmail.
By the time Erdogan and Macron met at a NATO summit in July 2018, relations were particularly low.
Delegation members had fraught exchanges and eventually all officials were sent out, apart from interpreters, so Erdogan and Macron could talk man to man, the second French official said.
But there was no thaw. "It's a cold relationship," said the French official. Asked for their account of the meeting, Turkish officials did not comment.
In November 2019, Macron told an interviewer NATO was experiencing "brain death" because a member state, Turkey, was going against alliance interests in the Middle East. In response, Erdogan said Macron should check if he was brain dead.
After that, said a French diplomat, "there was a deterioration in relations."
The two leaders nonetheless kept open lines of communication. Phone conversations were civil, according to the French diplomat. Macron's team distinguished Erdogan's public rhetoric, which they felt was to shore up his domestic support, and his real intentions, the diplomat said.
But the rhetoric of recent weeks has reached an unprecedented low.
The French president decided not to reciprocate to Erdogan's latest comments, the first French official said, because personal insults were undignified.
While world leaders sent Macron text messages offering condolences on the killing of the teacher, none were sent to Macron on Erdogan's behalf, the official said.
Macron's predecessor as president, Francois Hollande, had frequent interactions with Erdogan while he was in office and compared him to Russian President Vladimir Putin.
"Erdogan is a nationalist orator who, like Putin, is capable of flying off the handle," Hollande told Reuters.
"In a month or two, if he needs to, he will speak to Macron, but it remains to be seen if Macron will let him do that without consequences."