The amount of Afghan farmland planted with cannabis fell by nearly a fifth last year after one province launched a fierce eradication campaign, but a bumper crop meant that actual production rose compared with 2011, according to the UN.

Officials in southern Uruzgan province, which borders Kandahar and Helmand, largely stamped out farming of the drug because of worries it was financing the Taliban. In 2011 there were over 1,000 hectares of the crop there, but last year under 100 hectares were sown.

"According to reports from the field, the reduction was caused by a strictly enforced ban by provincial authorities, which was imposed because cannabis fields seemed to have been used by insurgent groups as hiding places," the UN Cannabis Survey Report said.

Planting in most other areas remained largely steady, with just over half of commercial production concentrated in the south of the country. The report does not include "kitchen garden" plots of the drug grown for personal use, but these produce relatively small amounts.

Overall Afghanistan produced 1,400 tonnes of commercial cannabis resin in 2012, worth around $65 million, the report estimated. A slightly smaller crop in 2011, when prices were higher, brought in nearly $100 million.

Cannabis production in Afghanistan is dwarfed by opium farming, which last year took up more than 10 times as much farmland and produced a crop worth hundreds of millions of dollars. Afghanistan produces around 90% of the world's opium supply.

However many poppy farmers in the south plant a spring opium crop and, when it has been harvested, turn to cannabis for the summer. "It seems that cannabis and opium are more complementary crops... than substitutes for each other," the report said.

Government efforts to stamp out poppy farming may even push up production of cannabis, the report warned. Last year the UN said Afghanistan's importance as a source of resin for world markets might be growing as more farmers switched to the crop.

"With increasing pressure on poppy cultivation through eradication and other measures, the possibility of the commercial production of cannabis gradually playing a much bigger role in the illicit economy of Afghanistan is not beyond the realms of imagination," the report said.

Cannabis resin can be much more lucrative than opium for individual farmers. It brings in over $1,500 in extra earnings per hectare, requires less weeding and is comparatively easy to harvest. However the plants need irrigation at a time when streams fed by snow melt are drying up and a long summer growing season can stop subsistence farmers planting vital food crops on the land.

The regional representative for the UN office on drugs and crime (UNODC), Jean-Luc Lemahieu, said that farmers balance "family needs, food security, access to markets...[and] risk" when deciding what to plant each year, and explained that no one is simply "an opium farmer" "a cannabis farmer" or a "wheat farmer".