In August 2019, after inspecting the cockpit of Russia’s then-new fifth-generation Su-57 fighter warplane, Turkish President Recep Tayyip Erdogan asked his Russian counterpart, Vladimir Putin, if it was for sale.

“Yes, you can buy it,” Putin responded with a smile, as he enticed Erdogan with Russia’s latest foreign jets at the MAKS-2019 international air show outside Moscow.

The duo, donned in dark suits and dark shades, toured other warplanes and then took a break to eat ice cream cones.

“Will you pay for me?” Erdogan asked Putin, nodding towards the cones, to which Putin responded, “Of course, you’re my guest”.

The exchange exemplified the renewed closeness of Turkish-Russian security relations after a difficult period, during which Turkey downed a Russian fighter plane that it said had strayed across the border from Syria. But it also showcased Erdogan’s personality-driven approach to foreign policy during his two-decade rule.

As Turkey has sought to position itself as a regional heavyweight, the Justice and Development Party or AK Party leader’s confident, if confrontational, style has shaped the country’s international relations.

Turkey has certainly grown more influential – not just across the Middle East, but also Africa and Europe, with its prominent role in mediating between Russia and Ukraine a particular example.

But a possible new successor is on the rise, with emboldened opposition leader Kemal Kilicdaroglu from the Republican People’s Party, or CHP currently holding an edge in opinion polls.

Kilicdaroglu, a social democratic politician also backed by five smaller parties in an alliance against Erdogan, has promised to overturn the president’s legacy.

Sinan Ogan from the ATA alliance is also vying for the top spot. A former candidate, Muharrem Ince from the Homeland Party dropped out of the race just three days before the election.

So, Turkey may enter a post-Erdogan era after Sunday’s presidential and parliamentary elections, and that could mean foreign policy changes.