Russian President Vladimir Putin and his Turkish counterpart Recep Tayyip Erdogan are too alike to remain enemies for long. On Monday, the Kremlin’s official website published excerpts from Erdogan’s letter to Putin in which the Turkish leader apologizes for the downing of a Russian warplane in November and offers compensation to the dead pilot’s family.

There may be economic reasons for the unexpected apology, but the two leaders’ ideological closeness — and their interest in doing deals — probably also helped end the spat.

After the Russian plane flying a mission in Syria briefly crossed the border into Turkey and was downed by the Turkish air force, Putin demanded an apology and an offer to compensate Russia for the damage, but Erdogan insisted that it was Putin who should apologize for the airspace violation. Both sides accused each other of backing terrorists in Syria; at times, the rhetoric appeared too heated for the rift ever to be healed.

To punish Turkey, Moscow shut down package tours to Turkey, forbade Turkish construction firms to build in Russia and banned Turkish fruit, vegetable and poultry. The European Bank for Reconstruction and Development estimated last year that the Russian sanctions would cut Turkey’s economic growth between 0.3 to 0.7 percentage points in 2016, but Erdogan was undeterred.

The number of Russian visitors to Antalya, in previous years one of Russians’ favorite seaside destinations, dropped 95 percent this year. It would have been tolerable — Turkey traditionally gets about five times more tourists from Europe than Russia — but this year Britons and Germans are also staying away because of perceived security threats, so the total number of tourists is down 45 percent compared with last year. This could have influenced Erdogan’s turnabout, but the Turkish leader’s calculus is probably more complex.

Just as the Kremlin published Erdogan’s apology, Turkey and Israel announced the normalization of diplomatic relations, severed six years ago after eight Turks died in an Israeli raid on a Gaza-bound flotilla. This may allow Turkey to diversify its energy supply: Israel can now build a gas pipeline to Cyprus, which would help Turkey become less dependent on Russian gas. Gazprom, the Russian state-owned producer, supplies about 55 percent of Turkey’s needs.

Russia is dead set against the pipeline proposal. Israel is aware of the risk to the project, and it has alternative plans to send gas to Egypt, liquefy it there and export it using ships, not pipelines. To make the pipeline possible, Erdogan needs to talk to Russia, perhaps reviving shelved plans for a new Russian pipeline to Turkey to create a hub for further export to southern Europe.

Turkey’s position as a Middle Eastern gateway requires friendly relations with the major players. Erdogan is volatile, but he’s also wily, and he must understand that it’s easier for him to maintain a pragmatic, quid-pro-quo relationship with Putin than, say, European Union leaders.

Europe has promised Turks visa-free travel in exchange for Turkey’s willingness to take back undocumented immigrants coming from its territory. Yet in order to abolish visas, the EU has also demanded that Turkey change its much-criticized anti-terrorism laws, which have resulted in the jailing of numerous journalists and activists, something Erdogan has refused to do.

Late last week, Putin’s rubber-stamp parliament passed an even tougher set of anti-terrorist and anti-extremist laws than Turkey’s. From July 20, “justifying” or “inciting” terrorism on social networks will be punishable by a maximum prison term of seven years. Extremism — a loosely defined crime for which hundreds of people are fined or jailed every year — now carries an eight-year maximum sentence, up from the three-year maximum that Turkish law allows for comparable offenses. Telecom operators are forced to keep all messages and recordings of all telephone conversations for six months, and they must provide law enforcement agencies with description tools when needed. It’s probably the most repressive legislative package adopted in Russia since the demise of the Soviet Union.

Erdogan must feel a certain amount of envy for Putin’s ability to do pretty much whatever he wants in his country — but also a kinship. The authoritarian rulers have similar notions of threats to their power and their countries. They both see the world as an arena for cut-throat competition in which economic benefits trump values every time.

The spat was unnatural for the two dictators, and what’s a mere apology between two men who can do a lot to prop each other up? Erdogan is willing to let Kremlin propaganda outlets celebrate victory if that’s necessary to start making deals with Russia again — and to show the West that he has no shortage of alternative partners who don’t try to impose their values on him.

Based in Berlin, Russian writer Leonid Bershidsky is a Bloomberg View columnist and the author of three novels and two nonfiction books.

In a time of both misinformation and too much information, quality journalism is more crucial than ever.
By subscribing, you can help us get the story right.