The deal - which could see the end to a war that began in the 1960s - will now be voted on in a referendum
Colombia's government has agreed a peace deal with leftist rebels to end one of the world's longest-running conflicts.
The Revolutionary Armed Forces of Colombia (FARC) will lay down arms and reintegrate into civilian life under the historic agreement, which brings to an end a war that began in the 1960s and once threatened the country's existence.
More than 220,000 people were killed in the conflict, tens of thousands disappeared and millions fled their homes to escape the violence.
The accord, which was finalised after nearly four years of talks in Cuba, sparked celebrations in parks and bars in Colombian capital Bogota.
The deal will now be voted on in a referendum on 2 October.
"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, who was re-elected in 2014 after promising 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.
Ireland's Foreign Affairs Minister Charlie Flanagan has welcomed the signing of the agreement.
He said: “The horrific conflict in Colombia lasted over fifty years and has devastated the lives of generations of people and today the more than 200,000 people who lost their lives in this horrific conflict and their loved ones are foremost in my thoughts.
“This landmark peace agreement gives the citizens of Colombia the prospect of a brighter, more peaceful future. I congratulate President Juan Manuel Santos for his courage in pursuing peace as well as all the parties to the Talks who have worked for nearly four years to reach this point," he added.
Polls suggest Colombians will back the deal, but Mr 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.
Two former presidents oppose the accord, including the popular right-wing hardliner Alvaro Uribe.
Under the agreement, the FARC will have non-voting representation in Congress until 2018 and can take part in elections.
From then on, the 7,000 former rebels will have to win votes like any other party, Mr Santos said.
"We have won the most beautiful of all battles" lead FARC negotiator Ivan Marquez said after the announcement in Havana.
"The war with arms is over, now begins the debate of ideas."
The FARC took up arms in 1964 to battle against deep economic and social inequalities and, funded by the cocaine trade and ransoms for kidnapping, swelled to as many as 17,000 fighters at the end of the 1990s.
At one point, the rebels controlled large swathes of the country.
FARC abducted ranchers, politicians and soldiers and often held them for years in jungle prison camps.
Its captives included former presidential candidate Ingrid Betancourt and three US military contractors, who were rescued in 2008.