The deal was reached in talks backed by Iran, which supports the Syrian government, and Turkey, which supports the rebels. With a ceasefire in the areas holding, it offers a rare chance of success for foreign-brokered diplomacy in the intractable conflict.