The two leaders profess to respect the rule of law but are widely criticized for ignoring it when it threatens their reach. They have unleashed the courts or the tax authorities to silence criticism from big business and opposition media.

Mr. Putin is well known for cracking down on his opposition. Mr. Erdogan is building his own reputation for harsh treatment; scores of people have been investigated on charges of insulting the president and several foreign journalists have been deported.

Both tend to blame external, global conspiracies for failures.

Or as the Russian opposition leader Alexei Navalny wrote on his blog last week: “They both talk foreign policy nonsense to distract citizens from internal problems. Both use imperial ambitions, imperial rhetoric to strengthen their personal power and personal enrichment. Both hate social and news media. Both call the West their enemy and appeal to traditional values, while they both are immoral.”

They also enjoy soaring popularity ratings at home, which gives them a sense of impunity. The two men are such mirror images of each other, in fact, analysts said, that they are unlikely to be able to resolve the dispute over the plane without outside mediation.

“They do not trust each other,” Mr. Krastev said. “There is too much ambition on both sides.”

Mr. Putin has demanded a public apology for the downing of the military jet and compensation from the Turkish leadership. The extent of Mr. Putin’s pique is perhaps best reflected by the repeated accusations on Russian state television that Mr. Erdogan’s son is deeply involved in the black market trade in oil extracted by the Islamic State, the terrorist group that has taken over parts of Iraq and Syria — and whose Egyptian affiliate recently took responsibility for downing a Russian passenger jet in Sinai.

Mr. Erdogan strongly denied the allegations. “They are lies; they are slander. We have never, never had this kind of commercial relationship with any terror organization,” Mr. Erdogan said in an interview with France 24 last week. “They have to prove it, and if they can, Tayyip Erdogan will leave office.”

Still, Mr. Erdogan did seem to be trying to dial back after first demanding that Russia apologize over what Turkey said was a violation of its airspace, and direct military confrontation seems unlikely. By the weekend, he said, “We are truly saddened by this incident.”