Coca growers in Colombia on Thursday freed 180 soldiers they had taken hostage during an anti-narcotics operation earlier this week, the government's human rights ombudsman announced, after President Ivan Duque made a plea for their release.

The troops were taken on Tuesday while destroying plantations of the cocaine-yielding plant near the Venezuelan border.

General Omar Sepulveda told reporters that six platoons under his command were "kidnapped" in the municipality of Tibu in the northeast by farmers resisting the destruction of the illegal plantations they rely on to make a living.

The soldiers were surrounded by farmers armed with sticks and machetes, Sepulveda said. They were being held at a rural school.

But on Thursday, the coca growers "unilaterally" decided to withdraw and "not to impede the work of government forces," the office of the ombudsman, which served as a mediator to resolve the situation, said in a statement.

View of coca fields in Colombia in May 2021
View of coca fields in Colombia in May 2021 AFP / Raul ARBOLEDA

AFP journalists additionally saw the coca growers withdraw from the school.

"The situation ends here with a voluntary agreement from the growers," Jhon Ascanio, who participated in the mediation, told AFP.

In a video shown to AFP by the military, a group of soldiers in camouflage gear and armed with rifles were seen huddled together, with civilians keeping an eye on them.

"They are fine, they are armed," Duque told journalists earlier Thursday. "They wanted to avoid confrontation and I value their professionalism."

But the president said actions such as those taken by the farmers "cannot continue in this country... It is a kidnapping, and if there is no quick release, it will be treated as a kidnapping by all the authorities."

Colombian soldiers are seen after being released by coca growers who took them hostage for two days
Colombian soldiers are seen after being released by coca growers who took them hostage for two days AFP / Schneyder MENDOZA

A spokesman for the coca growers, who identified himself as "Junior," told W Radio the soldiers were taken in protest as farmers felt the government had not fulfilled a promise to help them replace coca leaf plantations with legal crops.

Tibu is in the Catatumbo region known for being the world's largest area of drug cultivation, with more than 40,000 hectares (99,000 acres) of coca plantations, according to UN data.

Holdouts from the disbanded FARC rebel group, members of the active National Liberation Army (ELN) guerrilla group, and other armed gangs fight over drug trafficking revenues along the long and porous border with Venezuela.

The country is experiencing its most violent period since a 2016 peace deal disarmed the Revolutionary Armed Forces of Colombia (FARC) and ended most fighting.

Duque, in office since 2018, has redoubled efforts to clamp down on the drug trade, with soldiers destroying coca plantations that are the only means of making a living for thousands of peasants and migrant laborers.

Clashes with coca growers are frequent.

Colombia remains the world's largest cocaine exporter, with a record 1,010 tons exported in 2020, and the United States is its largest consumer.

With Colombia's economy hammered by the coronavirus pandemic, some 42 percent of its population now lives in poverty and more than 16 percent is unemployed.