The U.S. and Russia have agreed on a cessation of hostilities for Syria that is set to take effect at midnight Friday, local Damascus time. It is the first attempt at a cease-fire in the war-torn country in years and despite the skepticism, U.S. and Russian officials have described it as the best pathway for ending five years of violence that has killed more than 250,000 people and displaced another 11 million. Here's a look at the proposed deal:

THE AIM

To achieve a reduction in violence that would allow aid operations across the country and bring the Syrian government and the opposition back to the negotiating table in Geneva for a U.N.-facilitated political transition process. Indirect talks launched earlier this month collapsed within a few days because of increased violence on the ground and a Russian-backed government offensive in Aleppo, near the Turkish border.

WHO DOES IT APPLY TO?

All combatants except the Islamic State group, Syria's al-Qaida branch known as the Nusra Front and any other militia designated as a terrorist organization by the U.N. Security Council. The only two other such militias are the Abdallah Azzam Brigades, an armed group that has carried out joint attacks with the Nusra Front, and The Army of Emigrants and Supporters, a group affiliated with the extremists. Russia and the Syrian government and the U.S.-led coalition, according to the agreement, are allowed to keep on striking at the Islamic State group and the Nusra Front during the cease-fire.

HAS IT BEEN ACCEPTED?

Syria's government, the political opposition and rebel groups as well as the Kurds have accepted the proposed cease-fire but reserved the right to respond to any violations. All said they would keep fighting against the extremists. The main Saudi-backed Syrian opposition group said it would give the process two weeks to gauge the seriousness of the other side.

THE MECHANISM

In order to promote the implementation of the cessation of hostilities, a Cease-fire Task Force co-chaired by the United States and Russia has been established under U.N. auspices. It will meet for the first time on Friday and be chaired jointly by Russia and the United States. According to the agreement, this Task Force will work to delineate the territory held by IS and Nusra, ensure communications among all parties to promote compliance and resolve allegations of non-compliance. The U.S. and Russia will also establish a communication hotline to exchange relevant information after the cease-fire has gone into effect.

LOOPHOLES

Critics say it is not clear exactly where along Syria's complicated front lines the fighting would stop and where counterterrorism operations could continue. Also unresolved are how exactly breaches in the truce would be dealt with. The lines are particularly blurred when it comes to the Nusra Front and mainstream rebels fighting to topple Assad. They are often located in the same areas and in some cases cooperate with each other. This may quickly derail the deal, as the opposition and its supporters have already said they are concerned the Syrian government and Russia will continue to strike at mainstream rebels under the pretext of hitting Nusra during the cease-fire.

WHAT HAPPENS IF IT FAILS?

Russia says there is no Plan B if the cease-fire collapses and fighting is expected to worsen if it does. Saudi Arabia and Turkey may intensify weapons shipments to the rebels or decide to take part in a ground offensive in Syria, ostensibly against the Islamic State group. That could easily escalate the conflict into a wider war involving regional players.