After half a century of bloodshed, Colombians have embarked on a new path to settle their political differences with the signing of a historic peace accord between the government and leftist rebels.

President Juan Manuel Santos and Rodrigo Londono, top commander of the Revolutionary Armed Forces of Colombia (FARC), formally signed the agreement before a crowd of 2,500 foreign dignitaries and special guests, including UN Secretary-General Ban Ki-moon and US secretary of state John Kerry.

Many in the audience, all dressed in white, had tears in their eyes as Mr Santos removed from his lapel a pin shaped like a white dove which he has been wearing for years and handed it over to his former adversary, who fastened it to his own shirt.

It was one of many symbolic gestures during the 90-minute ceremony overlooking the colonial ramparts of Cartagena that filled Colombians with hope and optimism for the work ahead to implement a 297-page accord that took four years to negotiate.

The deal's first test will be a weekend referendum in which voters are being asked to ratify or reject the deal.

If it passes, as expected, Colombia will move on to the thornier and still uncertain task of reconciliation.

If the accord is accepted by Colombian voters in Sunday's referendum, as polls say it will, the FARC's estimated 7,000 fighters would have to turn over their weapons to a team of United Nations-sponsored observers within six months.

A much tougher challenge will be reconciliation, a process that will require rebels and state agents who want to avoid jail to confess to war crimes committed during a 52-year conflict marred by brutalities on both sides.

The European Union announced it has suspended its sanctions against the FARC, which has been on the bloc's "terrorist list" since 2002. The sanctions have allowed the EU to freeze the assets of people, groups and entities linked to the FARC and to stop Europeans making funds or economic resources available to it. The US has yet to follow suit, although Mr Kerry said he was open to reconsidering the group's status.

In the longer term, the two sides have drafted an ambitious agenda to hasten the development of Colombia's long-neglected countryside and rid it of illegal coca crops that starting in the 1980s strengthened the FARC - and some say morally corrupted it - while other insurgencies across Latin America fell to the wayside.

Mr Londono, best known by his alias Timochenko, called Mr Santos "a courageous partner" and proclaimed there was no turning back on the FARC's decision to abandon Colombia's jungles.

"Let no-one doubt that we are going into politics without weapons," he said, before ending his speech with a simple but loudly applauded appeal for forgiveness.

"I apologise for all the pain that we have caused," he said.

Mr Santos, who for years was the FARC's top military opponent, was equally emphatic that he would honour his promise to promote pluralism and open up Colombia's traditionally elite-driven political system.

"As head of state of the fatherland we all love, I want to welcome you to democracy," he said. Earlier, he led the crowd in chants of "no more war".

Across the country, Colombians celebrated with a host of activities, from peace concerts to a street party in the capital, Bogota, where the signing ceremony was broadcast live on a giant screen.