The U.S. military under President Donald Trump has intensified its involvement in Afghanistan this year, resulting in a record number of airstrikes targeting jihadists, an unprecedented offensive against the Taliban’s lucrative opium business, and a low number of successful terrorist attacks in the last few months of 2017.

Nevertheless, the Pentagon and the United Nations warned that the U.S.-backed gains in Afghanistan are frail.

“The hard-won gains in Afghanistan – by the Afghans, the United States, NATO, and the international community – remain fragile, but are worth defending,” cautioned the U.S. Department of Defense (DOD) in its most recent assessment of the 16-year-old war in Afghanistan.

“The security situation remained highly volatile, as the Taliban and Islamic State in Iraq and the Levant-Khorasan Province (ISIL-KP) showed continued capacity for inflicting mass casualties amid increased Afghan and international air strikes,” the U.N. Security Council added in a report.

Marty Skovlund, a U.S. military veteran who served in Afghanistan, acknowledges in an article he recently wrote for Task & Purpose that U.S.-backed Afghan troops built momentum in Afghanistan in 2017.

However, he noted that 2018 “will likely be the bloodiest year to date,” adding, “The violence will get worse before it gets better.” The veteran wrote that “2017 was the first year that the Afghan security forces planned a true year-long campaign that did not recognize the traditional fighting season, and then followed through on it.”

President Trump inherited chaotic conditions in Afghanistan from his predecessor, notably an Afghan Taliban that controlled more territory than during any other time since the beginning of the war in 2001, a growing Islamic State (ISIS/ISIL) branch, and record production of opium and heroin, which provides the Taliban with up to 60 percent of its funding.

However, U.S. military officials have been sounding optimistic about the state of affairs in Afghanistan in recent months.

U.S. Gen. John Nicholson, the top commander of American and NATO forces, recently told reporters that the Taliban “cannot win” under the level of pressure Trump’s South Asia strategy is applying on the terrorist group.

Pentagon officials report:

The ANDSF (Afghan National Defense and Security Forces) has endured three challenging fighting seasons; U.S. and Afghan sources indicate this fighting season has been more successful than the last. … While high profile attacks remain largely unchanged year to year, additional U.S. authorities, close air support, changes in the organization of U.S. TAA [train, advise, and assist mission], and the psychological boost stemming from the new U.S. commitment, improved the effectiveness of the ANDSF in offensive operations this fighting season.

In a significant departure from the previous administration, Trump authorized Nicholson to target opium and heroin in Afghanistan, the world’s top producer of the illicit drugs.

U.S. troops and their local allies, in a matter of weeks, pulverized tens of millions of dollars worth of opium labs, dealing a significant blow to the Taliban.

Moreover, the DOD notes in its assessment that successful terrorist attacks are slightly down.

“From June 1 to November 20, 2017, the number of effective enemy-initiated attacks were slightly lower than the previous reporting period (December 2016-May 2017); averaging between 780 per month,” it reports.

Despite expanding its presence from one to at least six provinces, “the capability and influence of ISIS-K have begun to decline since its operational emergence and initial growth in 2015,” adds the Pentagon, later cautioning, “ISIS-K remains a threat to Afghan and regional security, a threat to U.S. and coalition forces, and retains the ability to conduct high-profile attacks in urban centers.”

Since the beginning of 2015, U.S. forces had been on a train, advise, and assist role in Afghanistan with the ANDSF, which includes police and military units, leading security operations.

Trump’s Pentagon stressed that the U.S. combat mission is complete.

DOD points out that the Taliban and al-Qaeda-allied Haqqani Network remain the top threats against American troops in Afghanistan.

In late Septemeber, the U.S. Inspector General for Afghanistan Reconstruction (SIGAR) and the Long War Journal revealed that terrorist groups, primarily the Taliban, control or contest about 45 percent of Afghanistan.

The Pentagon now claims terrorist groups control or contest 40 percent of the Afghan population. President Trump has approved the deployment of 14,000 American troops to Afghanistan, an increase from the estimated 10,000 who were there when he took office.

Since the war started in October 2001, U.S. military fatalities have reached 2,262, and injury incidents stand at 20,289, according to DOD figures. The United States has devoted up to $841 billion to the ongoing conflict.