HAVANA (Reuters) - Colombian President Juan Manuel Santos and the top FARC rebel commander pledged on Wednesday to end their 50-year war within the next six months, sealing their pact with a handshake likely to stand as a lasting image in the South American nation.

Cuba's President Raul Castro (C) reacts as Colombia's President Juan Manuel Santos (L) and FARC rebel leader Rodrigo Londono, better known by the nom de guerre Timochenko, shake hands in Havana, September 23, 2015. REUTERS/Alexandre Meneghini

Santos and FARC rebel leader Rodrigo Londono, better known by the nom de guerre Timochenko, also agreed the leftist guerrillas would lay down arms within 60 days of signing the deal, which now has an official deadline of March 23, 2016.

If successful, it would end a conflict that has killed 220,000 and displaced millions over half a century.

A lasting peace would also mark a huge advance for one of Latin America’s star emerging economies and could deal a setback to illegal narcotics trafficking. Some FARC units have formed an alliance with drug cartels, exchanging protection for money.

The government and the rebels have been in talks in Havana for nearly three years, but this was the first time Santos had come to Cuba and the first time he had met Timochenko.

“We will not fail,” Santos said at a signing ceremony. “The time for peace has arrived.”

Moments later, Santos and Timochenko greeted each other with a handshake. Cuban President Raul Castro, who hosted the meeting, joined his hands to theirs.

In Wednesday’s breakthrough, the two sides agreed to create special tribunals to try former combatants, form an amnesty that would exclude those who committed war crimes or crimes against humanity, and provide reparations for victims.

Santos stressed the justice accord would apply not just to the FARC but also government troops and right-wing paramilitary groups, which took up arms as mercenaries for wealthy landowners or to avenge their own grievances against the FARC.

With rebel negotiators insisting all along they would never go to jail, the special tribunals allow for less severe punishment for those who admit responsibility for their actions.

Those who readily admit to crimes would received five- to eight-year terms in undefined conditions of restricted freedom. Those who come forward belatedly would get five to eights years in jail. But those who challenge accusations against them and are found guilty would face up to 20 years in jail.

Timochenko repeated the rebels’ longstanding call for a bilateral ceasefire but also said the rebels were prepared to reach a peace deal even before the six months expire.

“We don’t want anything to stop this overflowing desire for peace and hope it will be forged in a hug of reconciliation,” Timochenko said.

RECONSTRUCTION “WILL TAKE YEARS”

Half a century of war has embittered many Colombians who mistrust the peace talks or want harsher retribution for their enemies, but the center-right Santos staked his presidency on the peace talks. He won re-election last year against a right-wing candidate who threatened to end the talks if elected.

“The end of the conflict will be a matter of a few months. The construction of peace in our land will take years,” Colombian Interior Minister Juan Fernando Cristo said on Twitter.

U.S. Secretary of State John Kerry called the breakthrough “historic progress” and telephoned Santos to congratulate him.

Slideshow ( 3 images )

The United States has poured billions dollars into military aid and drug-fighting efforts in Colombia, one of Washington’s closest allies.

Kerry also thanked Pope Francis for lending his support to peace when after Mass in Havana on Sunday he called on Colombia’s government and guerrillas to end their “long night” of war and said “we do not have the right to allow ourselves another failure.”

The pontiff is touring the United States, having left Cuba for Washington.

“The pope will be pleased to hear this,” Vatican spokesman Federico Lombardi told reporters, referring to the Colombian agreement. He said the pope would not get involved in concrete aspects of the talks but would provide moral support.

Previously, the government and the rebels reached a partial agreement on cooperating to end the illegal drug trade, in addition to others on land reform and the legal political participation for rebels once they disarm.

They also have a side agreement on removing landmines from the battlefield.

The major point left to negotiate is how demobilize rebel forces and stop the fighting, which has continued on and off throughout the peace talks.

Once a comprehensive deal is reached, it would go before Colombian voters for approval.

The insurgent group of about 8,000 combatants, down from 17,000 in their heyday, is considered a terrorist group by United States and the European Union.

The FARC grew out of a 1960s Marxist-inspired peasant movement demanding land reform, and has been fighting successive governments ever since. The struggle has created one of the world’s highest internally displaced populations.