BOGOTA, Colombia (AP) – Colombians cried and hugged as the leaders of their government and the country’s biggest rebel group signed a cease-fire and disarmament deal moving their country to the verge of a final peace accord to end decades of fighting.

As the agreement was signed in Havana, hundreds of people watched the ceremony live on a giant screen set up in Colombia’s capital, Bogota, many singing the national anthem and waving the Colombian flag.

Colombian President Juan Manuel Santos and Rodrigo Londono, commander of the Revolutionary Armed Forces of Colombia, shook hands and described the moment as historic after their lead negotiators signed a deal setting out how 7,000 rebel fighters will hand over their weapons once a peace accord ends a 52-year war that has killed more than 220,000 people.

Santos has said he thinks the accord could come as early as next month, although negotiators have missed a series of other government-announced deadlines.

“Colombia got used to living in conflict. We don’t have even the slightest memories of what it means to live in peace,” Santos said. “Today a new chapter opens, one that brings back peace and gives our children the possibility of not reliving history.”

The disarmament and cease-fire deal does not mean an immediate halt to conflict or the start of rebels surrendering their arms. That will begin only after a final peace deal is formally signed.

As nearly four years of peace negotiations seem close to success, attention is shifting to a referendum that Santos has promised to give Colombians a final say on its acceptance.

The peace deal could face difficulties due to the deep unpopularity of the rebels and the desire for revenge still felt by many Colombians over a conflict that killed so many and displaced millions. Supporters of the peace process also fear that too many voters could simply stay home, threatening to leave the referendum below the participation threshold needed to be valid.

FARC’s aging leaders agreed to begin negotiations in 2012, after a 15-year, U.S.-backed military offensive that greatly thinned rebel ranks.

“The Colombian armed forces that grew enormous during the war are now called to play an important role in peace,” said Londono, the FARC commander is better known by the alias Timochenko. “They were our adversaries, but going forward they’ll be our allies.”

Momentum had been building toward a breakthrough after Santos said this week that he hoped to deliver a peace accord in time to mark Colombia’s declaration of independence from Spain on July 20. But the agreement signed Thursday went further than expected.

In addition to a framework for a cease-fire, both sides agreed on a demobilization plan that will see guerrillas concentrate in rural areas under government protection and hand over weapons to United Nations monitors. Disarmament would be required to be completed within no more than six months of a peace accord’s signing.

The deal also includes security guarantees for the FARC during its transition to a peaceful political party. A similar attempt in the 1980s led to thousands of rebels and their sympathizers being killed by paramilitaries and corrupt soldiers.

“This is historic, a great hope for Colombia,” said Jimmy Gonzalez, a hotel worker in Bogota. “Let this end the spilling of blood that’s affected us for so many years.”

A peace deal won’t make Colombia safer overnight. The proliferation of cocaine remains a powerful magnet for criminal gangs operating in Colombia’s remote valleys and lawless jungles. And the National Liberation Army, a much smaller but more recalcitrant rebel group, hasn’t started peace talks.

The a strong element in Colombia opposed to a deal with the FARC is led by popular former President Alvaro Uribe, who spearheaded the military offensive against the FARC last decade.

“It damages the word ‘peace’ to accept that those responsible for crimes against humanity like kidnapping, car-bombing, recruitment of children and rape of girls don’t go to jail for a single day and can be elected to public office,” Uribe said Thursday in reaction to the latest agreement.

Still, regional and international leaders were enthusiastic.

Cuban President Raul Castro, whose country was one of the guarantors of the talks, said the end of five decades of war is close. “The peace process can’t turn back,” he said.

In Washington, U.S. Secretary of State John Kerry said in a statement, “Although hard work remains to be done, the finish line is approaching and nearer now than it has ever been.”

Join our Newsletter for the latest news right to your inbox