Colombia moved closer than ever to ending a half-century of bloodshed when its president joined leftist rebels in celebrating a cease-fire and disarmament agreement at a dignitary-studded signing ceremony in Cuba.

After more than three years of often prickly negotiations in the Cuban capital, President Juan Manuel Santos’ government and the Revolutionary Armed Forces of Colombia, or FARC, announced Wednesday that they had settled the final differences on how 7,000 rebel fighters will demobilize and hand over their weapons once a peace accord is implemented.