Last week was quite something in the annals of international politics. Just when the West thought it had enough problems with Moscow, mostly over Ukraine, President Vladimir Putin sent Russian military forces into Syria.

He brazenly told the United Nations, and President Barack Obama, that he was there to help fight Islamic State, or ISIL as the Obama administration refers to it. Then the Russian military launched attacks on moderate opposition forces in Syria that Americans have been working hard to train and equip.

What a mess.

Putin’s real goal in Syria is almost surely not to fight ISIL. His more plausible aim, as reflected in his military’s initial bombing targets, is to bolster President Bashar al-Assad’s shaky regime by attacking insurgent groups close to ISIL strongholds — even if they are relatively moderate and unaffiliated with ISIL or al-Nusra, an al Qaeda offshoot. Putin wants to protect his own proxies, retain Russian access to the naval facility along the Mediterranean coast at Tartus and embarrass the United States while demonstrating Russia’s global reach.

Though Putin is undoubtedly concerned about ISIL, he will likely leave that problem to others. It appears to matter little to him that Assad is responsible for killing most of the 250,000 Syrians who have died in the civil war to date — and caused most of the massive displacement and refugee flows as well. In any event, Putin probably blames American naïveté for the fact that this war has dragged on for four and a half tragic years.

Yet Putin’s cynicism about this conflict may not preclude U.S.-Russian collaboration on a practical path forward. If the international community envisions and then tries to create some type of future weak confederation in Syria, it is at least possible that Russian and U.S. objectives can be partly meshed.

American interests in Syria are limited. Washington needs to defeat ISIL and ultimately unseat Assad from power in Damascus, while mitigating the humanitarian disaster befalling the country as fast as possible.

Russian interests partly overlap. Putin needs ISIL contained before its offshoots wind up in Moscow — as previous Muslim militant groups have in the past. Beyond that, he wants to exercise Russian leverage and influence on the Middle East stage in a way that enhances his own national prestige, as well as his nation’s.

To find common purpose with Russia, Washington should keep in mind the Bosnia model, devised to end the fierce Balkan conflicts in the 1990s. In that 1995 agreement, a weak central government was set up to oversee three largely autonomous zones.

In similar fashion, a future Syria could be a confederation of several sectors: one largely Alawite (Assad’s own sect), spread along the Mediterranean coast; another Kurdish, along the north and northeast corridors near the Turkish border; a third primarily Druse, in the southwest; a fourth largely made up of Sunni Muslims; and then a central zone of intermixed groups in the country’s main population belt from Damascus to Aleppo. The last zone would likely be difficult to stabilize, but the others might not be so tough.

Under such an arrangement, Assad would ultimately have to step down from power in Damascus. As a compromise, however, he could perhaps remain leader of the Alawite sector. A weak central government would replace him. But most of the power, as well as most of the armed forces. would reside within the individual autonomous sectors — and belong to the various regional governments. In this way, ISIL could be targeted collectively by all the sectors.

Once this sort of deal is reached, international peacekeepers would likely be needed to hold it together — as in Bosnia. Russian troops could help with this mission, stationed, for example, along the Alawite region’s borders.

This deal is not, of course, ripe for negotiation. To make it plausible, moderate forces must first be strengthened. The West also needs to greatly expand its training and arming of various opposition forces that do not include ISIL or al-Nusra. Vetting standards might also have to be relaxed in various ways. American and other foreign trainers would need to deploy inside Syria, where the would-be recruits actually live — and must stay, if they are to protect their families.

Meanwhile, regions now accessible to international forces, starting perhaps with the Kurdish and Druse sectors, could begin receiving humanitarian relief on a much expanded scale. Over time, the number of accessible regions would grow, as moderate opposition forces are strengthened.

Though it could take many months, or even years, to achieve the outcome Washington wants, setting out the goals and the strategy now is crucial. Doing so could provide a basis for the West’s working together with — or at least not working against — other key outside players in the conflict, including Russia, as well as Turkey, the Gulf states and Iraq.

The Russian intervention in this war has admittedly made things far more complicated. But if Washington uses this moment to recognize that its current strategy in Syria is failing, it may find a path forward that could offer better cooperation between Moscow and Washington. More important, this could be a path that meshes far more realistically with the realities of power and politics inside this forlorn, war-torn land.