When Turkish President Recep Tayyip Erdogan touches down in Japan for the Group of Twenty summit in Osaka this weekend, he will arrive with a wide range of major political, economic and security issues on his plate.

At home, his Justice and Development Party (AKP), which has ruled Turkey since 2002, suffered one of its greatest electoral setbacks last Sunday, when its candidate for mayor of the country’s largest city, Istanbul, was soundly defeated in a controversial rerun ballot.

Abroad, his forward foreign policy has left Turkish troops hunkered down in Syria, watching Russian and Syrian government warplanes bomb Turkey’s anti-Assad allies in Idlib – Syria’s last rebel stronghold.

At the same time, Kurdish forces, with US support, continue to hold ground along Turkey’s southern border, despite President Erdogan’s pledges to force them out.

Turkey has also become embroiled in a dispute with European Union member Cyprus over Eastern Mediterranean gas resources – a dispute that has led to EU threats of sanctions and a heightening of tensions in this volatile region.

And then there’s the matter of Ankara’s decision to purchase Russian S-400 anti-aircraft missiles in a deal that has angered Washington and other allies of NATO member Turkey.

US President Donald Trump – whom Erdogan is scheduled to meet at the G20 – has also threatened sanctions, if Turkey goes ahead with the purchase, a move likely to damage the already-fragile Turkish economy badly.

Indeed, “At the national level, Turkey has some gigantic problems,” said Can Selcuki, of Istanbul Economic Research. “What Erdogan and Trump will talk about at the G20 could, therefore, be crucial.”

Sea of troubles

For some years now, Turkey has been pursuing a much more active foreign policy in the region, particularly since the revolts of 2010 and 2011, known as the Arab Spring.

“The Turkish government, and President Erdogan, saw this as an opportunity for Turkey to become a regional power,” said Ismet Akca, an independent Istanbul-based political scientist. “Turkey supported the Muslim Brotherhood government in Egypt and elsewhere, and became very involved in Syria. But then things did not go as anticipated.”

In Egypt, the Muslim Brotherhood government of president Mohamed Morsi was overthrown. In Syria, Russian intervention on the side of the embattled Syrian President Bashar al-Assad changed the equation, largely defeating rebel forces backed by Turkey and other outside powers.

While Ankara’s relations with Moscow initially nosedived after this intervention, Russia is a key energy partner for Turkey – supplying it with much of its natural gas.

At the same time, Erdogan has also seen Russian power as a way to counterbalance that of the US.

“Turkey wants to play the Russia card against the Americans, as Erdogan sees this as a way to win the country more room for maneuver, as it tries to become a regional power,” Akca said.

Turkey, therefore, found itself working alongside Russia in Syria, managing the withdrawal of defeated rebel forces to Idlib. Meanwhile, Russia green-lighted Turkish attacks on areas of northern Syria that had been seized by ethnic Kurds.

Ankara has long seen any expression of independent Kurdish territorial control as an existential threat, given its own large Kurdish population.

Now, however, that arrangement with Russia in Syria is under pressure.

A small number of US troops continues to be stationed in the remaining Kurdish-held territory in northern Syria, in effect blocking any further Turkish attacks, while Russian planes have also resumed bombing rebel forces in southern Idlib.

Back in 2017, too, Russia persuaded Turkey to buy its S-400 anti-aircraft missile system – a move that has since developed into a major crisis between Ankara and Washington.

“The problem is, Russia also wants to play the Turkey card against the US,” Akca said.

This would be the first time Turkey has bought major weaponry from a source outside the North Atlantic Treaty Organization, of which it is a member. Washington also says that buying these missiles undermines a deal it had with Turkey to purchase 100 US-made F-35 fighter jets – planes S-400s in Russia would be targeted against.

“We’ve clearly warned Turkey that its potential acquisition of the S-400 will result in a reassessment of Turkey’s participation in the F-35 program and risk other potential future arms transfers to Turkey,” US State Department deputy spokesman Robert Palladino told reporters back in March.

He then pointed out that the S-400 purchase could also lead to sanctions against the Turkish government, private industry or individuals, under the 2017 US Countering America’s Adversaries Through Sanctions Act (CAATSA).

This is no minor threat. “Last year, the imposition of US sanctions on two Turkish ministers over the detention of an American pastor exacerbated Turkey’s currency crisis,” recalled Jason Tuvey of Capital Economics.

Turkey’s economy has picked up a little since but is still extremely fragile. “The country’s large external debt burden leaves the Turkish currency, the lira, vulnerable to swings in investor risk aversion,” Tuvey added.

This has, however, done little so far to dissuade Erdogan from the missiles. Indeed, the Turkish president announced on Tuesday that delivery would be made in July, with payment already made and operators trained.

Step on the gas

Also adding to potential economic woes are sanctions now being threatened by the EU.

These follow offshore drilling for gas by a Turkish vessel in waters EU member Cyprus claims as lying within its exclusive economic zone.

This comes as part of a long-running dispute between Turkey and Cyprus over territorial waters in the region.

“For Erdogan especially, being tough on Cyprus is a way to show Turkey as a more powerful state, and potentially, to address the country’s dependency on imported gas,” Akca said.

The drilling has led to the government of Cyprus issuing arrest warrants for the drillship crew, while the EU has strongly condemned the Turkish action and threatened sanctions.

Cyprus has also meanwhile been commissioning its own offshore drilling, with the US company ExxonMobil one of the international oil and gas majors now looking to exploit these resources.

All eyes on Osaka

Erdogan’s scheduled meeting with Trump at the G20 will, therefore, see a wide range of issues potentially up for discussion.

Finding a way forward on the S-400s will likely be the priority issue, but this may be difficult.

“Rationally, Erdogan should try to find a compromise,” Akca said, “but with his recent mayoral election defeat in Istanbul, he may also want to re-establish himself as a strong leader – to show himself as someone still powerful.”

This could lead to some unpredictable outcomes, then, for both Turkey and the region.