Colombia's ELN guerrillas freed a hostage on Thursday and the government released two rebel prisoners in exchange, clearing the way for peace talks to begin next week.

The government hopes talks with the one remaining active rebel group in Colombia will seal a "complete peace" to end Latin America's last major armed conflict.

Odin Sanchez, a former lawmaker held captive since April 2016, was handed over to the Red Cross in the remote jungle region of Choco in western Colombia.

The government in turn released the two jailed rebels, Nixon Cobos and Leivis Valero, in the mountains of Santander, in the northeast.

Both sides confirmed the other had followed through on the deal, paving the way for formal talks to open Tuesday in the Ecuadoran capital Quito.

The ELN, or National Liberation Army, is the last active rebel group in a country torn for more than half a century by a conflict that has killed more than 260,000 people and left 60,000 missing.

President Juan Manuel Santos is trying to end the fighting for good. He won the Nobel Peace Prize last year for his efforts.

His government is currently implementing a historic peace deal with the country's largest rebel group, the Revolutionary Armed Forces of Colombia (FARC).

Talks with the ELN were due to open last October. But they broke down when the leftist rebels refused to release Sanchez.

– 'We did it' –

The successful prisoner exchange left Santos beaming with optimism.

"This conflict is over," he said, as he opened a summit of Nobel Peace Prize winners in Bogota.

"We did it. What seemed impossible, we made possible," he said, vowing the ELN talks would lead to "complete peace."

Sanchez voluntarily went into ELN custody last year to take the place of his brother Patrocinio, a former governor who had fallen ill after three years in captivity.

Patrocinio grew emotional talking about his brother's sacrifice, in an interview with AFP ahead of his release.

"It was very brave," he said.

"I spent more than two years with my hands and feet chained, in an airtight room in total darkness."

The ELN accuses the powerful Sanchez family of backing right-wing paramilitary groups in the Choco region, their political stronghold.

Patrocinio denied that claim, saying the ELN really only wanted ransom money. He said multiple ransom payments had been made, but declined to say how much.

– New hostage dispute –

Despite the hostage release, the negotiations look set to be tricky.

They will mark the fifth attempt to make peace with the ELN, a guerrilla group inspired by Argentine revolutionary Che Guevara and the Cuban Revolution.

The ELN has so far been a more difficult negotiating partner than the Marxist FARC, which freed its hostages before starting negotiations with the government in 2012 in Havana.

Both rebel groups formed in 1964, and have funded themselves with ransom kidnappings and drug trafficking.

Incidents involving ELN forces have kept tensions high in recent months.

On Tuesday the rebels announced a new hostage seizure, a Colombian soldier they captured last week.

The government's chief peace negotiator, Juan Camilo Restrepo, condemned the abduction.

"Instead of a gesture of peace and de-escalation, the ELN is coming into this negotiation process with a hostile gesture," he said.

The peace process also faces ongoing resistance from conservative opponents who accuse Santos of granting impunity to rebels guilty of war crimes.

Their opposition led voters to narrowly reject the peace deal with the FARC in a referendum last October. The embarrassing defeat forced Santos to pass a slightly revised version in Congress instead.

Colombia's territorial and ideological conflict has drawn in dozens of guerrilla and paramilitary groups, drug gangs and state forces over the decades.

Rights groups say massacres, rapes and other atrocities have been committed on all sides.