This is an excerpt from “The Afghanistan Papers: A Secret History of the War,” by Craig Whitlock.

The suicide bomber arrived at Bagram air base in a Toyota Corolla late in the morning on Feb. 27, 2007. He maneuvered past the Afghan police at the first checkpoint and continued a quarter-mile down the road toward the main gate. There, the bomber approached a second checkpoint, this one staffed by U.S. soldiers. Amid mud puddles and a jumble of pedestrians and vehicle traffic, he triggered his vest of explosives.

The blast killed 20 Afghan laborers who came to the base that day looking for work. It also claimed the lives of two Americans and a South Korean assigned to the international military coalition: Army Pfc. Daniel Zizumbo, a 27-year-old from Chicago; Geraldine Marquez, an American contractor for Lockheed Martin who had just celebrated her 31st birthday; and Staff Sgt. Yoon Jang-ho, the first South Korean soldier to die in a foreign conflict since the Vietnam War.

Unharmed by the explosion was a VIP guest at Bagram who had been trying to keep a low profile - Vice President Dick Cheney.

Cheney had slipped into the war zone the day before on an unannounced trip to the region. Arriving on Air Force Two from Islamabad, Pakistan, he intended to spend only a few hours in Afghanistan to see President Hamid Karzai. But bad weather prevented him from reaching Kabul, so he spent the night at Bagram, an installation with personnel numbering 9,000 about 30 miles from the capital.

Within hours of the bombing, the Taliban called journalists to claim responsibility and to say Cheney was the target. U.S. military officials scoffed and accused the insurgents of spreading lies. The vice president, they said, was a mile away at the other end of the base and never in danger. They insisted the Taliban could not have planned an attack against Cheney on such short notice, especially given that his travel plans had changed at the last minute.

"The Taliban's claims that they were going after the vice president were absurd," Army Col. Tom Collins, a spokesman for U.S. and NATO forces, told reporters.

But the U.S. military officials were the ones hiding the truth.

In an Army oral-history interview, then-Capt. Shawn Dalrymple, a company commander with the 82nd Airborne Division who was responsible for security at Bagram, confirmed that word had leaked out about Cheney's presence. The suicide bomber, he added, saw a convoy of vehicles coming out of the front gate and blew himself up because he mistakenly thought Cheney was a passenger.

The bomber wasn't far off the mark. The vice president was supposed to depart for Kabul in a different convoy about 30 minutes later, according to Dalrymple, who had worked with the Secret Service to plan Cheney's movements.

"The insurgents knew this. It was all over the news no matter how much it was tried to keep secret," Dalrymple said. "They caught a convoy going out the gate with an up-armored sport-utility vehicle and thought it was him. . . . That opened up a lot of eyes into the fact that Bagram was not a safe place. There was a direct link with the insurgencies."

The 2007 episode marked an escalation in the war on two fronts. By targeting the vice president at the heavily fortified base at Bagram, the Taliban demonstrated an ability to inflict high-profile, mass-casualty attacks far from the insurgents' strongholds in southern and eastern Afghanistan.

And by lying about how close the insurgents had come to harming Cheney, the U.S. military sank deeper into a pattern of deceiving the public about many facets of the war, from discrete events to the big picture. What began as selective, self-serving disclosures after the 2001 invasion gradually hardened into willful distortions and, eventually, flat-out fabrications.

This account is adapted from "The Afghanistan Papers: A Secret History of the War," a Washington Post book that will be published Aug. 31 by Simon & Schuster. A narrative history of what went wrong in Afghanistan, the book is based on interviews with more than 1,000 people who played direct roles in the war, as well as thousands of pages of documents obtained under the Freedom of Information Act.

The interviews and documents, many of them previously unpublished, show how the administrations of Presidents George W. Bush, Barack Obama and Donald Trump hid the truth for two decades: They were slowly losing a war that Americans once overwhelmingly supported. Instead, political and military leaders chose to bury their mistakes and let the war drift, culminating in President Biden's decision this year to withdraw from Afghanistan, with the Taliban more powerful than at any point since the 2001 invasion.

For the Bush administration and its NATO and Afghan allies, the months preceding Cheney's 2007 visit to Afghanistan had been an awful stretch. The number of suicide attacks had increased almost fivefold in 2006, and the number of roadside bombs doubled compared with the year before. The Taliban's cross-border sanctuaries in Pakistan were fueling the problem.

Before his arrival at Bagram, Cheney met in Islamabad with Pakistan's president, Pervez Musharraf, to urge him to crack down. The Pakistani strongman offered no help, saying his government had already "done the maximum."

Their public statements notwithstanding, U.S. military officials had been so worried the Taliban might target Cheney during the short dash between Bagram and Kabul that they originally set up a ruse.

The plan was to depart Bagram from a rarely used gate. Members of Cheney's traveling party would ride as decoys in the SUVs normally reserved for senior officials. The vice president would ride with Dalrymple, the young Army captain, in a lumbering military vehicle equipped with a machine gun. "You'd never expect him to ride in the gun truck," Dalrymple recalled.

That plan was scrapped after the suicide attack. Military officials decided it was too dangerous for Cheney to travel by road. He waited for the weather to clear and instead flew to Kabul to meet with Karzai. Cheney finally left Afghanistan that afternoon on a C-17 military aircraft without further incident.

At the same time that the U.S. military was struggling with the Taliban's resurgence, it was faring even worse with its much larger war in Iraq, where 150,000 U.S. troops were bogged down - about six times as many as the number deployed in Afghanistan. Given the calamity in Iraq, the Bush administration badly wanted to avoid the perception it was losing in Afghanistan as well.

Consequently, as the new year got underway, American commanders in Afghanistan expressed new levels of optimism in public that were so unwarranted and baseless that their statements amounted to a disinformation campaign.

"We are prevailing," Army Maj. Gen. Robert Durbin, the commander in charge of training the Afghan security forces, told reporters on Jan. 9, 2007. He added that the Afghan army and police "continue to show great progress each day."

Army Maj. Gen. Benjamin Freakley, commander of the 10th Mountain Division, gave an even sunnier assessment a few weeks later. "We're winning," he said during a Jan. 27 news conference. Despite the surge in bombings the year before, he declared that U.S. and Afghan forces had made "great progress" and "defeated the Taliban and the terrorists that oppose this nation at every turn."

As for the insurgents, Freakley said the rebels "achieved none of their objectives" and were "quickly running out of time." He dismissed the increase in suicide attacks as a sign of the Taliban's "desperation."

Three days later, Karl Eikenberry, a three-star Army general, visited Berlin to shore up European public support for NATO forces. He said the allies were "postured well for success" in 2007 and suggested the Taliban was panicking.

"Our assessment is that they actually look at time working against them," Eikenberry added.

But the generals' chorus of happy talk defied a year-long stream of intelligence assessments that the insurgency had gained strength.

In February 2006, Ronald Neumann, the U.S. ambassador to Afghanistan, told officials in Washington in a classified diplomatic cable that a confident Taliban leader had warned, "You have all the clocks but we have all the time."

In private, the flood of suicide attacks and roadside bombs - insurgent tactics imported from Iraq - stoked fear among U.S. officials in Afghanistan of a potential "Tet Offensive in Kandahar," an unnamed Bush administration official told government interviewers, referring to the bloody 1968 military campaign by North Vietnamese forces that undermined public support for the Vietnam War.

"The turning point came at the end of 2005, beginning of 2006 when we finally woke up to the fact that there was an insurgency that could actually make us fail," the official said. "Everything was turning the wrong way at the end of 2005."

Neumann arrived in Kabul as the top U.S. diplomat in July 2005. The son of a former U.S. ambassador to Afghanistan, he had spent a pleasant summer there as a young newlywed in 1967, traveling cross-country, camping and riding horses and yaks during a time of peace.

When he returned 38 years later, Afghanistan had been continuously at war for a quarter century. Right away, he told his superiors in Washington it was obvious the violence was about to escalate further.

"By the fall of 2005, I had reported, in combination with General Eikenberry, that we were going to face a vastly increased insurgency in the next year, in 2006, and that it was going to get much bloodier, much worse," Neumann said in a diplomatic oral-history interview.

At first, many officials in Washington found it hard to believe the Taliban could present a strategic danger. Even some military leaders in the field underestimated the Taliban and thought that, while it might control pockets of rural territory, it posed no threat to the government in Kabul. "We thought the Taliban's capability was greatly reduced," then-Brig. Gen. Bernard Champoux, deputy commander of a U.S. military task force from 2004 to 2005, said in an Army oral-history interview.

Paul Toolan, a Special Forces captain who served in Helmand province in 2005, said senior U.S. officials mistakenly viewed the war as a peacekeeping and reconstruction mission. He tried to explain to anyone who would listen that the fighting had intensified and the Taliban had bolstered its firepower.

"If we don't do this right, we're going to allow these guys to keep us languishing here for a lot of years," Toolan cautioned in an Army oral-history interview.

But the Bush administration suppressed the internal warnings and put a shine on the war. In a December 2005 interview with CNN, Defense Secretary Donald H. Rumsfeld said things were going so well that the Pentagon would soon bring home roughly 10 percent of its forces in Afghanistan.

"It's a direct result of the progress that's being made in the country," Rumsfeld declared.

Two months later, however, Rumsfeld's office and other officials in Washington received another classified warning from their ambassador in Kabul.

In a gloomy Feb. 21, 2006, cable, Neumann predicted that "violence will rise through the next several months," with more suicide bombings in Kabul and other major cities.

He blamed the Taliban's sanctuaries in Pakistan and warned that, if left unaddressed, they could "lead to the reemergence of the same strategic threat to the United States that prompted our . . . intervention over 4 years ago" - in other words, another 9/11.

In the dispatch, Neumann expressed fear that popular support would wane if expectations weren't managed. "I thought it was important to try to prepare the American public for that so that they wouldn't be surprised and see everything as a reverse," he said in his oral-history interview.

But the public heard no such straight talk. In a visit to Afghanistan shortly after the ambassador sent his cable, Bush did not mention the rising violence or the resurgent Taliban. Instead, he touted improvements such as the establishment of democracy, a free press and schools for girls.

"We're impressed by the progress your country is making," Bush told Karzai at a March 1 news conference.

Two weeks later, in a briefing with reporters from Bagram, Freakley denied that the Taliban and al-Qaeda were getting stronger. The violence was spiking, the general said, because the weather was getting warmer and his forces were going on the offensive.

"We're taking the fight to the enemy," the 10th Mountain Division commander said. "If you see an increase in violence here in the coming weeks and months, it's probably driven by offensive operations that the Afghan National Army, Afghan National Police and coalition forces are taking."

He added, "I'll tell you that progress in Afghanistan is steady and you can really see it."

In a Pentagon press briefing in May, Durbin, the commander in charge of training, presented a rosy report on the state of the Afghan security forces. He said they had been "effective at disrupting and destroying" their enemies and that the Afghan army had made "remarkable" progress in recruiting.

Durbin closed by inviting journalists to visit Afghanistan and judge for themselves how the Afghan security forces were performing. "I think if you do, you'll be as impressed as I am with their progress," he said.

Days later, someone did come see for himself. Retired Army Gen. Barry McCaffrey was a hero of the Persian Gulf War. It had been a decade since he had been on active duty, but the U.S. military asked him to visit Afghanistan and Pakistan and conduct an independent assessment. The mission was not publicized.

McCaffrey interviewed about 50 high-ranking officials over the course of a week. In his nine-page report, he lauded U.S. commanders and highlighted several successes, but he didn't sugarcoat his verdict: The Taliban was nowhere near defeated, and the war was "deteriorating."

He judged the Taliban as well-trained, "very aggressive and smart in their tactics," as well as armed with "excellent weapons." Far from panicking or feeling the pressure of time, the insurgents would "soon adopt a strategy of 'waiting us out,' " he added.

In contrast, McCaffrey said that the Afghan army was "miserably under-resourced" and that its soldiers had little ammunition and shoddier weapons than the Taliban. He blasted the Afghan police as worthless: "They are in a disastrous condition: badly equipped, corrupt, incompetent, poorly led and trained, riddled by drug use."

Even under a best-case scenario, McCaffrey predicted, it would be 14 more years - until 2020 - before the Afghan security forces could operate without U.S. help.

The report was passed up the chain of command to Rumsfeld and the Joint Chiefs of Staff. "We will encounter some very unpleasant surprises in the coming twenty-four months," McCaffrey warned. "The Afghan national leadership are collectively terrified that we will tip-toe out of Afghanistan in the coming years - leaving NATO holding the bag - and the whole thing will again collapse into mayhem."

If McCaffrey's conclusions weren't sobering enough, Rumsfeld soon received another harsh dose of reality.

On Aug. 17, 2006, Marin Strmecki, a trusted civilian adviser to the defense secretary, delivered a 40-page classified report titled "Afghanistan at a Crossroads." Strmecki had made a separate fact-finding trip to the war zone after McCaffrey and arrived at many of the same conclusions.

But he cast stronger doubt on the reliability and viability of Washington's allies in Kabul. The Afghan government, he said, was crooked and feckless and had left a power vacuum in many parts of the country for the Taliban to exploit.

"It is not that the enemy is so strong but that the Afghan government is so weak," Strmecki reported.

Meanwhile, the U.S. Embassy in Kabul grappled with a fresh wave of internal pessimism. Neumann, the ambassador, sent another dour classified cable to Washington on Aug. 29. "We are not winning in Afghanistan," it declared.

Two weeks after the ambassador's warning, Eikenberry sat down for an interview with ABC News on the fifth anniversary of the 9/11 attacks and offered the flip version for public consumption.

"We are winning," the general insisted, adding, "but I also say we have not yet won." Asked whether the United States could lose, Eikenberry responded, "Losing is not an option in Afghanistan."

If the generals had listened to their soldiers in the field, however, they might have shied away from such hubris.

Staff Sgt. John Bickford, a 26-year-old soldier from Lake Placid, N.Y., spent much of 2006 in Paktika province in eastern Afghanistan. He was stationed with other 10th Mountain Division soldiers at Firebase Tillman, named after Pat Tillman, the National Football League player who enlisted in the Army after 9/11 and was later killed by friendly fire.

Bickford said the fighting was "about 10 times worse" than his first deployment to eastern Afghanistan three years earlier. His unit clashed with insurgents four or five times a week. The enemy massed as many as 200 fighters to try to overrun U.S. observation posts.

"We said that we defeated the Taliban, but they were always in Pakistan and regrouping and planning and now they're back stronger than they have ever been," he said in an Army oral-history interview. "Anytime that they did an assault or an ambush it was well-organized, and they knew what they were doing."

In August 2006, Bickford was leading a patrol in an armored Humvee when insurgents ambushed his convoy with rocket-propelled grenades. Shrapnel tore up Bickford's right thigh, calf, ankle and foot. His team fended off the assault, but his days as an infantryman were over.

Bickford spent three months recovering at Walter Reed Army Medical Center. During his convalescence, he reflected on the rising threat posed by insurgents.

“These are very smart people, and they’re the enemy but they deserve tons of respect and they should never, never, never be underestimated,” he said.