The Colombian government and left-wing Farc rebels have signed a historic agreement that formally brings an end to 52 years of armed conflict.
The rebel leader Timoleon Jimenez, known as Timochenko, apologised to "all the victims of the conflict" and was greeted by cheers and applause.
He said: "I would like to ask for forgiveness for all the pain that we have caused during this war."
Guests dressed in white at the ceremony in Cartagena, to symbolise peace.
The last of the major Cold War conflicts killed 260,000 people and left more than six million internally displaced.
President Juan Manuel Santos said: "Colombia celebrates, the planet celebrates because there is one less war in the world.
We will achieve any goal, overcome any hurdle and turn our nation into a country we've always dreamed of - a country in peace."
Timochenko said the Farc, which began as the armed wing of the Communist Party in 1964, is leaving armed conflict behind and moving in to peaceful politics.
"We are being reborn to launch a new era of reconciliation and of building peace," he said.
"Let us all be prepared to disarm our hearts."
The president and Timochenko used a pen made from a bullet to sign the deal.
Analysis, by the BBC's Lyse Doucet in Cartagena:
There was so much symbolism in this historic signing - a pen made from a bullet to sign the peace deal, the singing of Beethoven's Ode to Joy, everyone dressed in white.
President Santos said this historic moment was a message from Colombia to the world: no more war. "No more war," the crowd chanted in return.
This was the first time Timochenko addressed the nation live on TV. He promised the Farc would give up its guns, and more than that, he asked for forgiveness.
It earned him a standing ovation. That would have been unthinkable not long ago.
But after 50 years of war, many Colombians still aren't ready to forgive. As President Santos put it, the hard work of building peace now lies ahead.
The deal comes after four years of talks in Havana, Cuba, between government and rebel negotiators. It must be approved by the Colombian people in a popular vote on Sunday before it can pass into law.
Polls indicate the majority of Colombians will vote for it, although there has been some opposition, led by ex-president Alvaro Uribe.
Under the deal, the Farc will be relaunched as a political party. Correspondents say that although there is widespread hope that the deal may bring an end to the kidnappings and bloodshed that have blighted Colombia over five decades, it has also led to divisions in Latin America's fourth-biggest economy.
Some people are angry that it allows rebels to enter parliament without serving time in prison.
Correspondents say President Santos has risked his political future on the success of the peace deal.
Dignitaries attending the ceremony included UN Secretary General Ban Ki-moon, US Secretary of State John Kerry and Cuban President Raul Castro.
Mr Ban told the ceremony: "You can look to the future with optimism. You are inviting Colombians to live in peace."
As Mr Kerry arrived in the country, he praised Mr Santos' efforts to secure the deal and pledged $390m (£300m) to help implement it.
The US is not yet ready to remove the Farc from its list of terrorist organisations, he said, but is prepared to review that sanction once the peace agreement is up and running.
However, only hours before the signing, the EU announced it would suspend the Farc from its list.
"This decision will allow us to support the post-conflict programme and will be of benefit to all Colombians," EU foreign policy chief Federica Mogherini said on social media.
Farc rebels must now hand over weapons to the UN within 180 days.
But the smaller ELN rebel group is still active, as are right-wing paramilitary groups.
The Farc's 52-year fight
1964: Set up as armed wing of Communist Party
2002: At its height, it had an army of 20,000 fighters controlling up to a third of the country. Senator Ingrid Betancourt kidnapped and held for six years along with 14 other hostages
2008: The Farc suffers a series of defeats in its worst year
2012: Start of peace talks in Havana
2016: Definitive ceasefire