Drought in Afghanistan last year decimated the cultivation and production of opium, but the deadly drug remains a threat to peace and security, the United Nations says in a report released Tuesday.

Opium is the primary ingredient in heroin and the top source of funding for the Taliban. This year, the U.N.’s annual Afghanistan Opium Survey, which covers 2018, came amid ongoing peace negotiations between the U.S. and the Taliban.

Despite the drop in opium cultivation and production, the area used to grow the poppies remained “historically high,” the U.N. notes, adding:

During 2017, Afghan farmers gave more land to opium cultivation than at any other time since [the U.N.] monitoring began. A year later, the area under cultivation had plummeted by 20 percent to 263,000 hectares. As a result, the amount of opium produced also dropped sharply, from roughly 9,000 tonnes in 2017 to an estimated 6,400 tonnes a year later – a 29 percent reduction. Despite these decreases, the area under poppy cultivation was still at its second-highest level since the beginning of monitoring.

Lethal drug overdoses in the United States, primarily fueled by opioids like natural heroin and synthetic fentanyl, also dropped last year, for the first time in decades.

The U.S. Drug Enforcement Agency (DEA) maintains that Afghan heroin in the United States only “contributes a minimal amount” to the historic number of deadly drug overdoses in the United States. Latin American (heroin) and Chinese (fentanyl) traffickers are responsible for the vast majority of opioids and other drugs in the U.S., the DEA asserts.

In neighboring Canada, however, most of the heroin does originate in Afghanistan, the world’s top producer of opium.

Opium cultivation and production in Afghanistan has skyrocketed since the end of 2002, nearly a year after the U.S. invaded the country in October 2001.

The areas used to grow the deadly drug have by increased more than two-fold from 74,000 hectares in 2002 to 263,000 hectares, or an area 15 times the size of Washington, DC, last year. Estimated opium production went up about 90 percent, from 3,400 tons in 2002 to 6,400 tons last year.

According to the U.N., opium farmers in the south who relied on irrigation systems to cultivate their poppies were mostly unaffected by the lack of rain and snow.

Last year, the U.S. Inspector General for Afghanistan Reconstruction (SIGAR), a watchdog agency revealed that American taxpayer money had funded irrigation canals linked to opium cultivation in southern Afghanistan.

Historically, southern Afghanistan, namely the provinces of Helmand and Kandahar, are the top opium-producing regions in the country. Kandahar is the birthplace of the Taliban.

The U.N. report notes:

In the south of the country, where most crops are grown, farmers were able to avoid the worst effects of the drought by using irrigation systems. Poppy cultivation reduced by only 8 percent in this region. … Farmers in Hilmand cultivate almost exclusively on irrigated land and the sophisticated irrigation system appeared to have shielded farmers from the impact of the drought – opium poppy cultivation remained stable in this province when compared to 2017.

Even with the drought, the Afghan opium economy remained lucrative.

The U.N. learned:

Along with the fall in cultivation, production and income for farmers, the overall opiate economy in Afghanistan – which includes heroin production and trafficking to the border – contracted sharply between 2017 and 2018. The gross value of the Afghan opiate economy fell by two-thirds, from between US$4.1 and US$6.6 billion in 2017 to between US $1.2 and US $2.2 billion in 2018. The opiate economy was still worth between 6 and 11 percent of Afghanistan’s GDP, and it exceeded the value of the country’s officially recorded licit exports of goods and services.

Moreover, the U.N. found that the Taliban continued to generate millions in funding for its activities last year, noting:

More than half of village headmen said taxes [on opium] were paid to anti-government groups and 17 percent referred to the Taliban by name. Roughly US$29 million in taxes was incurred in 2018, of which at least US$3 million went to the Taliban. However, this is likely to underestimate the Taliban’s influence as some headmen would almost certainly have included the Taliban under the designation of anti-government group.

Some estimates have placed Taliban opium revenues in the hundreds of millions.

Opium activities are reportedly more prevalent in areas outside the government’s control, but it still occurs in areas held by the U.S.-backed administration in Kabul, U.N. investigators reported.

U.S. government officials believe the Taliban controls or contests about half of Afghanistan.

It remains unclear whether the U.S. peace negotiators are pushing the Taliban to cut its ties to the opium trade, which the Pentagon considers to be the terrorist group’s economic engine.

Amid the peace talks, U.S. President Donald Trump’s administration quietly ended an unprecedented airstrike campaign targeting opium and heroin labs.

Although the U.S. has invested billions on counternarcotics activities in Afghanistan, the country remains the world’s top producer of opium and its heroin derivative.