HAVANA : The Colombian government and FARC rebels will sign a definitive peace deal within six months to end half a century of conflict, President Juan Manuel Santos said Wednesday, as the two sides announced a major breakthrough.

Santos and FARC leader Timoleon “Timochenko” Jimenez presided over a ceremony where government and rebel negotiators signed a deal on justice for crimes committed during the conflict, which had been the key issue blocking progress in the dragging peace talks.

Santos said he and Timochenko “have agreed that at the latest in six months - six months - these negotiations must conclude and the final peace accord must be signed.”

“It’s not going to be an easy job because there are still difficult points to agree upon, but that is the instruction we have given to our delegations: they must complete the accord as soon as possible,” he said.

US Secretary of State John Kerry hailed what he called “historic progress” in finally ending a conflict that has killed more than 220,000 people and uprooted six million.

“Peace is now ever closer for the Colombian people and millions of conflict victims,” he said.

Santos, 64, had made a surprise trip to Havana, where the talks are being held, for the signing ceremony.

It is the first time he has appeared at the negotiations he set in motion nearly three years ago and which he has staked his presidency on successfully concluding.

It was also the first time he had met Timochenko, with whom he shook hands after the deal was signed - the center-right president clad in a white dress shirt, the leftist guerrilla in a white Cuban-style “guayabera” shirt with pockets.

Timochenko, 56, said the deal “opens the possibility to offer full and detailed truth” to victims of the conflict.

Cuban President Raul Castro was also present for the ceremony.

Meanwhile, EU foreign policy chief Federica Mogherini said the breakthrough was “a decisive step forward,” and called on all involved parties to ensure “effective and credible justice for the victims of the conflict.”

“This will be an essential element to help heal the wounds of violence and build effective and sustainable peace,” she said in a statement.

- Amnesty for ‘political, related crimes’ -

The talks in Havana, which began in November 2012, had stalled over the thorny question of whether guerrillas will face prison for kidnappings, use of child soldiers, cocaine trafficking and other crimes.

The new deal includes an amnesty for “political and related crimes,” though it will not cover crimes against humanity, genocide, war crimes, or other grave violations, said officials from Cuba and Norway, the countries mediating the talks.

The deal also includes special courts with both Colombian and foreign judges to try those charged with the most serious crimes.

Both FARC members and government forces will be subject to their jurisdiction.

Those who admit their crimes will get reduced sentences of five to eight years. Those who do not will face sentences of up to 20 years.

Victims of the conflict such as Teresita Gaviria, who testified before peace talk negotiators, welcomed the announcement.

Gaviria, whose son disappeared 17 years ago, said the deal meant that “the victims can now have a sense of calm,” and called the breakthrough “a fatal blow for all those who doubted peace.”

Experts on the peace process hailed the deal as a milestone.

Political analyst Ariel Avila said Colombia is now on an “irreversible” path toward peace.

“Not everything is resolved, but what was announced today is a substantial step forward,” said Avila, of the Foundation for Peace and Reconciliation in Bogota.

Norway, which helped mediate the talks, called the latest advance “extremely positive” but warned that the way forward was still difficult.

“Not everyone in Colombia wants a peace agreement,” Norway’s Foreign Affairs Minister Borge Brende told his country’s TV2.

The breakthrough comes on the heels of a visit to Cuba by Pope Francis, who warned Sunday that Colombia could not afford “yet another failure in peace talks” and called for “definitive reconciliation.”

The pope’s spokesman Federico Lombardi heralded Wednesday’s announcement as good news, while Venezuelan President Nicolas Maduro extended his country’s “full support” for the breakthrough on Twitter.

Mexico’s government, meanwhile, hailed the negotiating parties’ “significant progress.”

The Colombian conflict began with the founding of the FARC in 1964 in the turbulent aftermath of a peasant uprising.

Over the decades it has drawn in not only government troops and various leftist guerrilla armies, but also right-wing paramilitary groups - now officially disbanded - and drug traffickers.

The FARC has been observing a unilateral ceasefire since July 20. Santos has repeatedly rebuffed their demands for a bilateral ceasefire, but has suspended air strikes on rebel positions.

There are six broad items on the agenda at the talks.

Deals had already been reached on three of them: land reform, political participation for ex-rebels and fighting the drug trafficking that has fueled the conflict in the world’s largest cocaine-producing country.

With a deal now signed on the justice issue, the only unsettled questions are disarmament and the mechanism by which the final accord will be ratified.

The FARC, the largest leftist guerrilla group still active in Colombia, has an estimated 7,000 fighters.

The other remaining rebel group, the National Liberation Army (ELN), has about 2,500.

The ELN and the government have been in “exploratory” talks since January 2014, but have not yet opened a formal peace process.