The Peruvian government has said it will allow limited cultivation of coca despite earlier opposition.
Coca can be used to banish hunger and altitude sickness
It had threatened legal action after a regional authority in the Andes issued a by-law lifting curbs on the growth of coca, the raw ingredient in cocaine.
The government backed down after the governor of Cuzco said the new by-law would affect one valley and not the whole region.
Farmers want to cultivate coca for its traditional uses as a medicine and tea.
Cuzco governor Carlos Cuaresma said the by-law had originally been misinterpreted by the government, which thought it affected the whole region.
Following a meeting with Mr Cuaresma, Peruvian Prime Minister Carlos Ferrero said the matter had now been resolved.
Coca growers or 'cocaleros' have recently stepped up their protests against the restrictions imposed on their livelihood.
They say coca is an integral part of life in the Andes, where it is often taken as a traditional remedy to stave off hunger and altitude sickness.
Mr Cuaresma acknowledged that the decision to legalise coca production was a concession to Cuzco's increasingly militant growers.
The government had earlier said that the new by-law was an attempt to legalise a product that increasingly ends up in the hands of the cocaine dealers.
Despite efforts to outlaw the planting of new crops, coca cultivation continues to expand in the Peruvian highlands.
The UN has blamed the increase on the crackdown on coca production in Colombia, which it says has fuelled production in Bolivia and Peru.
The decision to legalise coca production in Cuzco has put Peru in a sticky position, says the BBC's Americas editor Paul Keller.
If it does nothing, he says, other coca-growing regions could follow suit and thereby greatly increase coca output.
The head of the country's anti-drug agency says such a trend could transform Peru overnight into a "narcostate".
But taking action against Cuzco also has its risks.
Mr Cuaresma has said he "wouldn't be responsible" for the consequences if the government tried to overturn the law, hinting that Cuzco could press for regional autonomy.