For five years fighting has raged in Syria, a globally resonant nightmare kept going in part by the insistence of Bashar Assad's opponents that he must go even despite their battlefield failures to force him from power. Now an inflection point may be at hand, with powerful opposition backer Turkey suggesting Assad, despite his brutality in the war, could play a role in an unspecified transition period.

The statement Saturday by Turkish Prime Minister Binali Yildirim was nuanced: On one hand, "Assad does not appear to be someone who can bring (Syrians) together" — but on the other, "there may be talks (with Assad) for the transition."

Until now, Syria's neighbor to the north was determined to see him out of power — providing refuge and supply lines for a variety of Syrian rebel groups and turning something of a blind eye to the use of its territory by Islamic State jihadis waging their own fight with Assad as well.

Turkey had several reasons for offering critical support to the rebellion. Though not an Arab state, Turkey is predominantly Sunni, like most of the rebels, and it naturally chafes at the domination of Syria by Assad's Alawite sect, an offshoot of Shiite Islam and part of a regional axis that includes Lebanon's Hezbollah group and Iran. The government of President Recep Teyyip Erdogan is Islamist-rooted while Assad is avowedly secularist. And Turkey is a NATO member which until now has supported the West's efforts to end the repressive authoritarian system in Damascus.

Erdogan is not naturally given to back down, but he is operating in perilously shifting ground.

The Syrian Kurds have emerged as the main force fighting the Islamic State group, affording them a great deal of autonomy in their enclave in the north of the country, bordering Turkey. The strengthening of the Syrian Kurds has in turn emboldened Turkey's own minority Kurds; that's a worrying development for Ankara, which has long tried to keep down Kurdish power and ambitions.

Nonetheless, after suffering a series of attacks on civilians which were blamed on IS, Ankara is now promising to more actively fight the jihadis as well. That would create a supremely awkward implicit alliance of Turkey and the Kurds — as well as Iran, Syria and the U.S.-led coalition. It's a situation many would be eager to keep brief.

Ankara is also tired of taking in Syria refugees; they now number over two million.

Perhaps most important: Erdogan's strikingly repressive crackdown after the failed July military coup has been widely criticized by the West, prompting him to move closer to Russia; a friendly meeting two weeks ago with Vladimir Putin, Assad's determined patron, commenced a rapprochement and seemed to hint at more to come.

Ayham Kamel, a Middle East analyst with the Eurasia Group consultancy, said Turkey's position on Assad is becoming significantly more flexible as Russia plays a more active role, and that the Syrian government's recent and unprecedented bombing of U.S.-backed Kurdish positions sought to show Ankara that Assad is the only serious partner who can guarantee that Syria's Kurds remain contained.

"I think this is the beginning of a dance where both parties signal not only their willingness but ability as well to find areas of common interests in terms of containing the Kurds," Kamel said. "We are in the process of bargaining and trying to find a settlement in which all parties have a win."

With so many Arab nations unravelling or sidelined by insurgencies, Turkey is poised for greater influence in the region despite the lingering resentments of heavy-handed colonial rule by its predecessor, the Ottoman Empire. Yet for its new openness to Assad to prevail, it would need to be adopted by other players, primarily the mainstream Syrian rebels and the key powers of the West.

For the West, the notion of a determined shift to democracy held great appeal back in 2011, when the Arab Spring was in its infancy and idealistic hopes ran high. But that has changed with the serial failures across the region — a failed state in Libya, the rise of IS in multiple countries, never-ending wars in Yemen and Syria, the election of Islamists in Egypt followed by misrule and their ouster by the military.

Iraq's sectarian miseries have even lent some currency in the region to the notion that Saddam Hussein, brutal despot though he was, at least held together a unified state.

The Syrian war in particular has had disastrous consequences across a wide area: a half million killed, half the country's population displaced, and millions of refugees flooding not only Turkey and other neighboring countries but also Europe, fueling xenophobia and economic difficulties. And it created bedfellows to discomfit Washington: Iran, astoundingly given its history, even recently allowed Russia to launch airstrikes from its territory in support of Assad.

The Syrian government, for its part, has unleashed all kinds of indiscriminate weapons against civilian areas in its quest for survival, using warplanes, so-called barrel bombs and siege-and-starvation methods that have resulted in the death of tens of thousands.

Yet the West, fearing another Middle Eastern quagmire, has wavered — stopping short of announcing a no-fly zone in northern Syria, not attacking Assad's forces after blaming him for the use of chemical weapons, and hesitating to forcefully back and heavily arm the rebels. That landscape has proven a boon for Putin, whose support of Assad appears determined, strategic and successful when compared to the Western powers' prevarications.

Viewed from that perspective, Western leaders may quietly come to the conclusion that the need to end the war could trump the need to be immediately rid of Assad. Nudging them in that direction is Assad's central argument: that the most powerful of his opponents, the jihadi radicals of the Islamic State group, are, amazingly perhaps, the greater of the evils.

___

Karam reported from Beirut.