Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

When President Donald Trump complained recently that the U.S. military has become bogged down in Afghanistan, he was probably right. The U.S. is not winning that war.

The president's frustration was revealed Wednesday after NBC News reported details of a tense White House meeting that took place last month.

Trump startled his advisers by suggesting they fire the war's top military commander, as well as inquiring about getting a piece of Afghanistan's mineral wealth and comparing the country to one of his favorite New York restaurants, according to senior administration officials.

"We aren't winning," Trump complained, according to these officials. "We are losing."

By most measures, the president is correct.

After almost 16 years, the nation's longest war has seen the deaths of 2,216 American military personnel and tens of thousands of civilians. It has also cost the American taxpayers an estimated $714 billion.

In return, the U.S.-backed Afghan government controls less than 60 percent of its own country, according to a report last month by the Special Inspector General for Afghanistan Reconstruction, a government watchdog more commonly known as SIGAR.

"And a lot of that control is pretty tenuous," according to Shashank Joshi, a senior research fellow at the Royal United Services Institute, or RUSI, a London think tank.

"The most [American generals] will be able to offer is to stop the bleeding, and that might not be enough for Trump"

Much of the rest is controlled by a resurgent Taliban, with many areas that the U.S. and its allies fought hardest to secure slipping back into militant hands.

The Taliban, which espouses a fundamentalist interpretation of Islam and harbored 9/11 mastermind Osama bin Laden in the run-up to the attack, was ousted from power by U.S.-backed forces at the end of 2001.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"Things are very bad, and Trump is correct to say the U.S. is losing in Afghanistan, or at least it's certainly not winning," Joshi said.

Trump's own defense secretary, James Mattis, admitted as much to the Senate Armed Services Committee in June.

Members a breakaway Taliban faction in the Shindand district of Afghanistan's Herat province in May 2016. Allauddin Khan / AP

"We're not winning in Afghanistan right now and we will correct this as soon as possible," he said during his testimony.

However, Mattis' pledge appears to have stalled as Trump's national security team has been unable to come up with a new strategy for him to approve despite months of trying.

Trump is far from alone in his Afghan struggles. Successive presidents George W. Bush and Barack Obama cycled through multiple strategies without bringing the war to an end.

Right now, along with the Afghan government's territorial woes, the violence remains relentless.

"Armed conflict continued to cause severe harm to civilians across Afghanistan" during the first half of this year, according to a United Nations report released last month.

Between January and June alone, 1,662 civilians were killed and 3,581 injured — a decrease of less than 1 percent on 2016, the report said. It said more than 26,500 civilians have died since 2009.

The crater left by a truck-bomb attack in Kabul on May 31. Wakil Kohsar / AFP/Getty Images

Furthermore, this year included one of the deadliest single attacks against civilians since the war began in 2001. In May, a truck bomb struck the heart of the Afghan capital, Kabul, killing more than 150 people.

The U.S. military ended its official combat role in 2014 and now leads a NATO coalition of some 13,000 soldiers from 39 countries as part of a "train, advise, assist" mission. Of these, around 8,400 are American personnel.

Although U.S. casualties are not at the level they were following Obama's "surge" of 2009, American soldiers continue to die.

On Wednesday, two U.S. service members were killed when their NATO convoy came under attack near an airport in the southern Afghan city of Kandahar.

The U.S. has also been unsuccessful at curbing Afghanistan's massive drugs trade.

Afghan farmers harvest opium sap from their poppy fields in the Surkh Rod district of Nangarhar province. Noorullah Shirzada / AFP/Getty Images

According to SIGAR, around $8.6 billion of American money has been spent trying to stop Afghanistan's opium production, which is the largest in the world. But more Afghan opium is growing than ever before.

"No matter which metric you use, this [anti-opium] effort has been a real failure," Gen. John F. Sopko, SIGAR's inspector general, told NBC News last year.

That money is part of an estimated $119.7 billion spent by the U.S. in an attempt to rebuild Afghanistan. SIGAR, which scrutinizes this spending, told NBC News last year how much of this money has been wasted on such things as useless aircraft, unnecessary facilities, and buildings that literally melted in the rain.

Add to this an Afghan government that is "cobbled together from the winners and losers of the last election, and is very divided," according to Joshi at RUSI.

So what now?

Some of Trump's advisers want to send several thousand additional troops to Afghanistan while others favor the U.S. reducing its role in the war.

Joshi is believes that the former would not work — "why would more troops make a difference now when over 100,000 did not during the Obama surge?" — and that the latter may be closer to the president's heart.

Withdrawal is "clearly the president's instinct," he said. "He clearly wants to wash his hands" of the war.

"The most [American generals] will be able to offer is to stop the bleeding, and that might not be enough for Trump," Joshi added. "He likes winning."