Five years and hundreds of thousands of dead Syrians after the start of the “Arab Spring” uprising, the civil war that attempted to overthrow Bashar al-Assad might finally come to an end tomorrow. According to Russian president Vladimir Putin, an agreement on a cease-fire and cessation of hostilities will come into effect on Friday, followed by negotiations between the Assad regime and some of the rebel groups in Kazakhstan. The deal will exclude “terror groups,” one of whom will be rather easy to guess:

“Three documents have been signed,” Putin said today during a meeting with Russia’s foreign and defense ministers. “The first document is between the Syrian government and the armed opposition on a cease-fire on the territory of the Syrian Arab Republic.

“The second document is a package of measures to control the cease-fire regime. And the third document is a statement on readiness to begin peace talks on the Syrian settlement.”

Russia and Turkey will guarantee the truce, Putin said, adding that the parties to the deal agreed to meet for peace talks in former Soviet republic Kazakhstan, according to The Associated Press.

Also, Syria’s military today said it agreed to a nationwide cease-fire starting at midnight.

Turkey later clarified the point on “terror groups”:

Turkey’s Foreign Ministry said groups regarded as terror organizations by the U.N. Security Council would be excluded from the cease-fire, apparently referring to the Islamic State of Iraq and Syria (ISIS) group and the al-Qaida-linked Fatah al-Sham Front. It said the government and the opposition had agreed to halt attacks, including aerial attacks, and not to expand territories under their control in a way that would be detrimental to each other.

Russian Defense Minister Sergei Shoigu said the truce will include 62,000 opposition fighters across Syria, and that the Russian military had established a hotline with its Turkish counterpart to monitor compliance.

Syria’s rebels also confirm the cease-fire … most of them, anyway:

Syria’s National Coalition, a leading political opposition group based in Turkey, confirmed its support for the truce, according to Agence France-Presse.

“The National Coalition expresses support for the agreement and urges all parties to abide by it,” spokesman Ahmed Ramadan told AFP.

He said key rebel groups including the powerful Ahrar al-Sham and Army of Islam factions have signed the cease-fire deal, though there was no immediate confirmation from rebel officials.

Curiously, no mention has been yet made about Jabhat al-Nusra. One of the original radical-Islamist groups to take the field in the civil war, they first explicitly offered its allegiance to al-Qaeda  but then switched allegiance two years ago to ISIS. Perhaps the agreement simply lumps the Nusra Front in with ISIS, but it’s operated as a separate unit in the western and northern areas of Syria, and has been a significant force in the field. The potential for confusion seems … rather high.

In fact, that may be the biggest problem with this cease-fire. How can Turkey guarantee that the various militias and smaller-scale Islamist networks will abide by it? For that matter, how will these groups react when the Assad regime starts getting picky about which groups fall into the “approved” category and which fall into the “annihilate at will” category? If the anti-Assad force had coalesced into a single, hierarchical organization, it would be much easier to maintain the discipline on both sides for a cease-fire. But then again, had they done that, they might have toppled Assad years ago, too, before Russia and Iran had a chance to intervene.

That intervention seems decisive now. After the fall of Aleppo, it didn’t take long to get the rebels to agree to stop fighting, at least temporarily. The question will be whether Russia decides to really take on ISIS after it succeeds in propping up Assad, or whether he’ll leave that to the US and its Sunni-nation coalition to handle. Putin might decide to strengthen his hand with Iran by helping to demolish the radical and insane Sunni Islamists in Raqqa (and help out Assad a little more too), or leave the US coalition to pick up the tab. Thanks to the US fade to irrelevance in Syria and near-irrelevance in Iraq, Putin has all the choices he could want.