LIMA (Reuters) - Two farmers were killed in clashes in Peru that erupted on Friday as authorities launched an operation to uproot coca plants - used to make cocaine - in a region near the border with Bolivia, a local mayor and the police said.

A third person was in critical condition and had been taken to a local hospital, said Roger Larico, the mayor of the district of San Gaban in the region of Puno.

The eradication team - 158 civilian workers and 72 police officers - had arrived to San Gaban before dawn to destroy illegal coca farms in the coming days, but were attacked by people wielding machetes and sticks as they sat up their camp, the Peruvian National Police said in a statement.

But Larico said witnesses told him that the police had fired live bullets recklessly.

“They were shooting right and left. That’s why we have this bloodshed,” Larico told Reuters by phone.

The deaths are under investigation, said Victor Rucoba, the head of the government’s eradication agency.

“It’s very likely that to protect their lives and the lives of unarmed civilians, police had to increase the use of force,” he added in comments broadcast on local TV channel Canal N.

The unrest underscores the risks of forcibly eradicating illegal coca, a crop that tends to fetch a much higher price in Peru than alternatives such as coffee and cacao. It comes a day before U.S. Secretary of State Mike Pompeo visits the Andean country in a four-country tour of South America.

Peru has been one of the leading producer countries of cocaine for decades, despite efforts by consecutive governments to capture drug traffickers and shift farmers toward alternative crops from coca.

But in recent years, illegal coca farms in Peru have expanded.

The U.S. government said in November that Peru’s potential cocaine production had risen 20 percent to a 25-year high of 491 tonnes.

Police reinforcements were being sent to San Gaban to ensure the eradication team could work in the days ahead, said Rucoba, adding that coca cultivation had expanded “exponentially” in the area.

In a 2017 report, Peru’s anti-narcotics agency Devida said coca growers from the country’s most notorious drug-trafficking region, the VRAEM, had been migrating to Puno to start new farms. The coca produced in San Gaban is part of a supply chain that moves cocaine into Brazil through Bolivia, it added.

Peru plans to eradicate about 25,000 hectares (61,776 acres) of illegal coca crops per year through 2021, according to the country’s anti-narcotics plan.

Coca is also grown legally in Peru, where it is widely used as an infusion as well as in traditional indigenous rituals.