Turkey and Russia, whose up-and-down relationship has helped shape the Syrian war and its related crises, shared a new trauma on Monday after an off-duty Turkish police officer assassinated Russia’s ambassador.
The killing of Andrey G. Karlov in Ankara caused global alarm and raised questions about the larger consequences.
On social media, many drew parallels to the assassination of Archduke Franz Ferdinand of Austria, which helped set off World War I — a comparison that analysts, thankfully, reject.
No group has claimed responsibility for the attack, which took place at an art gallery in the Turkish capital where Mr. Karlov was speaking. The gunman, who was killed at the scene by security forces, shouted “God is great” in Arabic and later said in Turkish: “Don’t forget Aleppo. Don’t forget Syria.”
That may hint at his motive: The Russian Air Force was a key part of the Syrian government’s successful assault on rebel-held parts of Aleppo, which included widespread attacks on civilians.
What follows is an explanation of what the episode means for Turkey, Russia, Syria and the United States.
Could this lead to a conflict between Turkey and Russia?
That seems very unlikely. So far, both countries are working to manage the situation and sending signals of cooperation. They appear to be aligning their explanations of what happened, pointing their fingers at mutual enemies but not each other.
The reason is Syria. In the past few months, Turkey and Russia have taken pains to line up their once-conflicting strategies there.
Aaron Stein, a Turkey expert at the Atlantic Council, put it bluntly: “Turkey needs Russia to advance its war interests. Russia needs Turkey to win, as it defines winning, in Syria. Everyone has an incentive to handle this like adults.”
A crisis over a dead ambassador could jeopardize the two countries’ stakes in Syria — or, worse, revive the destabilizing tensions of last year — so they are working to smooth things over.
Why has there been tension between Turkey and Russia?
Also over Syria, which goes to show the volatility of the situation. It also demonstrates that both countries are so focused on protecting their Syria agendas that even their nationalistic, grievance-prone leaders would rather play it cool.
The two countries were, and to some extent still are, on opposite sides of the Syrian war. Turkey opposes President Bashar al-Assad of Syria and has backed rebel groups. Russia supports Mr. Assad and entered the conflict on his behalf in the fall of 2015.
Shortly after Russia intervened, its planes began bombing Turkish-backed rebels and flew along — Turkey says across — the Turkish-Syrian border. In November 2015, Turkey shot down a Russian jet, precipitating a major crisis and fears of war. That also could have pulled in the United States, which is bound by treaty to defend Turkey, a NATO ally, and wanted to avoid escalation in Syria.
Under those circumstances, the assassination of an ambassador could provoke an even larger conflict. But over the last year, the countries’ relationship has changed significantly.
How did they go from enemies to partners?
After years of pursuing Mr. Assad’s downfall, Turkey shifted this summer to a more modest strategy: preventing Syrian Kurdish groups from accumulating too much territory along the border. That change aligned the country with Russia.
Turkey fears that Kurdish control of the border would strengthen Kurdish separatism in Turkey, where the government is fighting Kurdish groups, some of which have carried out terrorist attacks.
Russia’s entry into the war also changed Turkey’s calculus, making the campaign against Mr. Assad suddenly costlier and less likely to succeed.
Russia, for its part, initially struggled to gain ground against the Syrian rebels, some of whom received Turkish backing. Moscow appears to have concluded that it is better off with Turkey as a partner than an adversary.
The two countries appeared to settle on an unofficial deal: Turkey would drop its support for certain rebels who threatened Russian interests in Syria, and Russia would drop its support for Syrian Kurdish groups. Russia also allowed Turkish troops and allied militias to occupy Syrian border territory that had previously been controlled by Kurds and the Islamic State.
Mr. Stein of the Atlantic Council called the arrangement “Aleppo for Al Bab”: Russia and Mr. Assad would take Aleppo, while Turkish-allied militias would take the strategically located town of Al Bab.
Because the cities are nearly adjacent, the Turkish and Russian campaigns benefit each other. At the same time, with their forces mere miles apart, a major breakdown over Mr. Karlov’s assassination would simply be too dangerous to tolerate.
Will the assassination change anything?
There is no indication so far that Turkey or Russia will alter their Syria policies. If anything, the attack may cement their partnership.
Mr. Stein predicted that President Recep Tayyip Erdogan of Turkey would seek to distract attention from his government’s unpopular Syria policy by pinning the attack on the United States-based Turkish cleric Fethullah Gulen, whom Mr. Erdogan also blamed for a coup attempt in Turkey this summer.
Mr. Gulen has denied the charges, and Washington has refused to extradite him, citing a lack of evidence. That has strained ties between the United States and Turkey, though this tension serves Mr. Erdogan by helping him to rally support at home, where America is unpopular.
“The biggest loser from this will be Washington,” Mr. Stein said. “It’s completely counterintuitive, but it’s Washington.”