Colombia's government and Marxist FARC rebels reached a final peace deal on Wednesday to end a five-decade war which once took the resource-rich country to the brink of collapse.
Under the historic agreement to end one of the world's longest conflicts, the Revolutionary Armed Forces of Colombia (FARC) will lay down arms and reintegrate into civilian life.
More than 220,000 people were killed in the conflict, tens of thousands disappeared and millions fled their homes because of the violence.
The accord, which was reached after almost four years of talks in Cuba, sparked celebrations in parks and bars in the Colombian capital, Bogota.
It will now go to a plebiscite vote on October 2.
"Today I can say - from the bottom of my heart - that I have fulfilled the mandate that you gave me," said President Juan Manuel Santos, 65, who was re-elected in 2014 on the promise of a peace deal.
"Colombians: the decision is in your hands. Never before have our citizens had within their reach the key to their future," he said in a televised address.
Most opinion polls suggest Colombians will back the deal but Santos, who has staked his legacy on peace, will face fierce opposition from powerful sectors of the country who believe the only solution is to finish the FARC militarily.
The deal is opposed by two former Colombian presidents, including popular right-wing hardliner Alvaro Uribe.
In Bogota, several hundred people gathered around a giant screen in the rain to listen to the announcement, waving Colombian flags and banners.
"I'm so happy. It was time to end the war," said Margarita Nieto, a 28-year-old accountant. "I know what is coming will be hard, but together we can cope."
Others are more sceptical about the terms of the agreement, especially the participation of FARC rebels in politics and the fact that they will not serve jail time for crimes committed during the war.
Under the deal, the FARC will have non-voting representation in Congress until 2018 and can participate in elections.
From then on, the 7,000 former rebels will have to win votes like any other political party, Santos said.
"We have won the most beautiful of all battles" lead FARC negotiator Ivan Marquez said following the announcement in Havana on Wednesday. "The war with arms is over, now begins the debate of ideas."
The two sides had signed a ceasefire in late June.
US President Barack Obama spoke by phone with Santos on Wednesday to congratulate him on the deal, the White House said.
The FARC took up arms in 1964 to fight against deep economic and social inequalities and, funded by the cocaine trade and kidnappings for ransom, swelled to as many as 17,000 fighters at the end of the 1990s, controlling large swathes of the country.
But the FARC were hit hard by Uribe's government from 2002, when he launched a US-backed offensive that killed many guerrilla leaders and halved their ranks.
An agreement with the FARC does not guarantee an end to political violence. Talks between the smaller, leftist National Liberation Army and the government have stalled.
Criminal gangs born out of right-wing paramilitary groups that were active during the worst periods of the conflict have since taken over some key drug trafficking routes. Still, violence is at its lowest level in decades.