Washington • Thousands of pages of documents detailing the war in Afghanistan released by The Washington Post on Monday paint a stark picture of missteps and failures — and those assessments were delivered by prominent U.S. officials, many of whom had publicly said the mission was succeeding.

The U.S. military achieved a quick but short-term victory over the Taliban and al-Qaida in early 2002, and the Pentagon’s focus then shifted toward Iraq. The Afghan conflict became a secondary effort, a hazy spectacle of nation building, with intermittent troop increases to conduct high-intensity counterinsurgency offensives — but, overall, with a small number of troops carrying out an unclear mission.

Even as the Taliban returned in greater numbers and troops on the ground voiced concerns about the U.S. strategy’s growing shortcomings, senior U.S. officials almost always said that progress was being made.

The documents obtained by The Post show otherwise.

“We were devoid of a fundamental understanding of Afghanistan — we didn’t know what we were doing,” said Douglas Lute, a retired three-star Army general who helped the White House oversee the war in Afghanistan in both the Bush and Obama administrations.

“What are we trying to do here?” he told government interviewers in 2015. “We didn’t have the foggiest notion of what we were undertaking.”

The 2,000 pages of interviews were obtained through a Freedom of Information Act request and years of legal back-and-forth with the Special Inspector General for Afghanistan Reconstruction, according to The Post. Formed in 2008, the office has served as a government watchdog for the war in Afghanistan, releasing reports quarterly on the conflict’s progress, many of which publicly depicted the shortcomings of the effort.

In one interview obtained by The Post, a person identified only as a senior National Security Council official said that the Obama White House, along with the Pentagon, pushed for data that showed President Barack Obama’s announced surge in 2009 was succeeding.

“It was impossible to create good metrics. We tried using troop numbers trained, violence levels, control of territory and none of it painted an accurate picture,” the official told interviewers in 2016, according to The Post. “The metrics were always manipulated for the duration of the war.”