The U.S. government's main watchdog organization in Afghanistan released its quarterly report to Congress this week, and it contained a shocking statistic: The government of Afghanistan has uncontested control over only 57 percent of its territory as of last November. That is down from 72 percent a year earlier.

The war in Afghanistan has proved to be the United States' lengthiest and costliest to date. Barack Obama campaigned for president on wrapping it up, but the emergence of the Islamic State in Afghanistan, as well as the resurgence of the Taliban and al-Qaeda, have prolonged the U.S. troop presence. There are about 8,400 U.S. troops in Afghanistan, more than in any other war zone in the world.

The report, by the Special Inspector General for Afghanistan Reconstruction (SIGAR), notes that the loss of territory is probably because of a strategic shift made by the United States, NATO and their Afghan National Army partners. In the past year, their troops have abandoned remote outposts and started bolstering defenses around provincial capitals instead. Taliban and other militants have attempted at least eight times to capture those capitals.

Nevertheless, the report paints a stark picture of struggle for the United States and its allies. Key provinces that have major roads linking the country, such as Helmand, Kunduz and Uruzgan, are heavily contested. Just in the past month, militants carried out numerous strikes in Afghanistan's main cities, including a bombing of a mosque in Kabul that killed 50 and an attack in Kandahar that killed five diplomats from the United Arab Emirates, among others.

A third of the population, or 9.2 million Afghans, live in contested districts, according to the SIGAR report.

Civilian deaths hit record numbers last year. A grim toll has been exacted upon Afghan security forces as well, with at least 6,785 soldiers and police killed and 11,777 wounded through November last year, SIGAR reported. Nine U.S. troops died in Afghanistan last year. The United States spends about $3.8 billion in security assistance in Afghanistan annually.

The war in Afghanistan has resulted in a grinding stalemate, with the government unable to maintain control. Newly inaugurated President Trump has at times seemed to be of two minds as to his intentions regarding the war.

“I would stay in Afghanistan,” Trump said in an interview with Fox News Channellast year. “I hate doing it. I hate doing it so much. But again, you have nuclear weapons in Pakistan, so I would do it.”

The fighting and ceding of territory has triggered a humanitarian crisis for millions of internally displaced Afghans. Their numbers have swelled, and they have combined with hundreds of thousands of Afghans returning from refugee camps in Pakistan, where they are no longer welcome.

“We are talking about at least 1.2 million people on the move. They get some blankets and food, pots and pans, tent materials, enough for the first few months. But what happens after that?” Dominic Parker, head of office for the U.N. humanitarian coordinating agency in Kabul, told The Washington Post's Pamela Constable.

Parker's agency is trying to raise more than half a billion dollars to cope with the crisis. U.N. officials expect a third of the country's population to need some kind of aid this year, a 13 percent increase over last year.

Among other mostly dispiriting findings, SIGAR found that in 2016, Afghan opium production rose 43 percent over 2015 levels and poppy eradication results were the lowest this decade. The Afghan attorney general refused to enforce or continue investigating an enormous corruption scandal at the country's biggest bank, and in one province, Badakhshan, nearly 7 in 10 government appointments were based on patronage, not merit, the watchdog agency found.

“Over the past five years, SIGAR investigators have uncovered a widespread, intricate pattern of criminal activity that pervaded the Humanitarian Assistance Yard at Bagram Airfield,” the report said. “U.S. military personnel, stateside contacts, and local Afghans had conspired in bribery, fraud, kickbacks, and money laundering for years as new personnel were assigned there and, in some cases, adopted the corrupt practices of their predecessors or new colleagues.”