I woke as the plane crossed into Afghanistan. It was a January evening. Outside my window, snow-covered mountains cut through the desert. In less than an hour, we would descend into Kabul. As a journalist, I had made this trip 10 times over the years — reporting on soldiers at remote military bases; embedding with Special Forces as they tried to train the Afghan army and build goodwill with the Afghan people; interviewing countless Afghans about the war that has, for nearly two decades, consumed their country.

Now I was headed back. In a few hours I’d meet with Austin “Scott” Miller, commanding general of U.S. and NATO forces in Afghanistan — the man tasked with overseeing the end of what has become the longest war in American history. Eighteen years after sweeping across the country in the aftermath of 9/11, the United States was — pending the outcome of peace talks with the Taliban — preparing to finally leave. If this never-ending war was really ending, I wanted to see it for myself.

Hamid Karzai International Airport was jammed as everyone piled out of the arrivals terminal into the chilly Kabul evening. A National Guard soldier in Miller’s security detail met me and drove me to the headquarters in an armored truck.

As we wound through Kabul, I recognized the same billboards from past trips featuring adoring pictures of Afghan hero Ahmad Shah Massoud — the leader of the Northern Alliance who was killed by al-Qaeda on Sept. 9, 2001. Two days after Massoud’s death, halfway around the globe, I was standing at the window of the newsletter publisher in Arlington where I worked, watching yellow insulation floating in the air after a plane had hit the Pentagon. A few hours later, I took the Metro past deserted Reagan National Airport and watched everyone around me staring in silence at the grounded planes.

When the war on terrorism started, I felt an urgent need to cover it. I got a job at a small newspaper in North Carolina that reported on Fort Bragg, and three months later I was in Iraq covering the invasion. A year later, I made it to Afghanistan. A Special Forces soldier told me on my first day with his team that the fighting could be over in a year if the soldiers kept the pressure on the Taliban. But years passed, and the war never quite seemed to end. Over time, the new reality was that Americans were there not just to destroy al-Qaeda — the original mission — but to build a stable Afghanistan. By 2010, what had started as a war fought by a few American Special Operations teams had escalated, with troop levels reaching 100,000. Presidents George W. Bush and Barack Obama both tried to bring the war to an end with a military victory. Both failed.

Finally, in 2014, combat operations concluded. It was mainly a symbolic ending. American troops transitioned to anti-terrorism operations and training Afghan forces. The burden of fighting the war was shouldered by Afghans, but with a lot of American and NATO help.

Especially in recent years, the war has become mere background noise for Americans. It was barely mentioned during the first two Democratic presidential debates. Now, the Trump administration is considering a withdrawal of troops in exchange for a Taliban promise to block international terrorists from operating on Afghan soil, as well as assurance the group will take part in an intra-Afghan dialogue.

Not everyone thinks President Trump’s blunt rhetoric about wanting to end the war has been wise. “If the enemy knows you’re going home regardless, why should he compromise on important issues?” a former senior commander in Afghanistan recently told me. “I don’t want to rule out the possibility there could be an acceptable agreement, but clearly the context of how the negotiations are being carried out is not the most desirable.” The former commander, who spoke on the condition of anonymity because he wasn’t authorized to discuss ongoing negotiations, also questioned the absence of the Afghan government at the bargaining table. “It is their country after all,” he said.

For this trip, my first since 2016, I wanted to see whether the new strategy to conclude the war felt different from previous attempts. But another question was looming too, one that was only growing more haunting with the signals that the war was, at last, coming to an end: Was it all worth it? The conflict had left 2,400 U.S. service members dead and more than 20,000 wounded; more than 145,000 people in all, including Afghan military, police and civilians, have died, according to a 2018 report from Brown University’s Costs of War Project; America has spent $737 billion on the war. Had all this death and maiming and money been justified by the results? Few people in 2001 disputed that evicting al-Qaeda from Afghanistan was necessary. But that mission had mostly been achieved in the early days of the war. What about everything that had happened since? What had America gotten right, what had we gotten wrong — and what, in the end, were the consequences?

Photo of eastern Afghanistan in 2011. (Charles Ommanney/Getty Images)

I. Uruzgan province, 2004

Isat in the back of a truck in a convoy racing toward a village in Uruzgan, a province in the south-central part of the country. It was my first time in Afghanistan, and it was better than I imagined; I loved the majestic mountains and was taken by the busy streets of Kabul. Now, I was shadowing a Special Forces team on the way to a village where a Taliban commander and possibly 50 fighters were holed up.

The Taliban had taken control of much of Afghanistan in 1996, after decades of civil war. But the group quickly became oppressive; women were forced out of jobs and schools and into burqas that covered them from head to toe. The Taliban also, of course, had been harboring Osama bin Laden — which was why U.S. forces were there at all. By the time I got to Afghanistan, the war had turned into a ghost hunt for al-Qaeda and Taliban fighters and bin Laden himself. The captain of the Special Forces team I was with — a 30-year-old West Point graduate from Nevada with a thick beard and barrel chest — told me that the big battles were over. They were down to the last fighters. The smart ones. “The dumb terrorists are dead,” he said.

By nightfall, everyone was in position. I waited with soldiers from the 25th Infantry Division while the Special Forces team and their Afghan allies crept into the village. All night we waited by the trucks. For a while, every noise sounded like a Taliban fighter creeping toward our position, but soon monotony set in. Nearby, the soldiers stood guard. A couple of hours before dawn, I fell asleep near the back tire of one of the trucks. I woke at dawn when the captain radioed for us to come up to the village.

The captain of the Special Forces team I was with told me that the big battles were over. They were down to the last fighters. The smart ones. “The dumb terrorists are dead.”

We got to a small clearing between a handful of sun-bleached, mud-walled compounds. A few men squatted on one side of the clearing. On the opposite side was a lone man. I walked up to him with the captain, who pointed out that his clothes were clean, he had good shoes, and both his beard and fingernails were groomed.

The captain told me the man had wandered into the village from the desert with a phone. The villagers didn’t know him. The imam, the village religious leader, thought he came with the Special Forces team. The captain said the villagers cowered from him. The Special Forces soldiers handcuffed and blindfolded the man. It was clear he didn’t belong in the village. They found out 12 hours later he was Abdul Wadud, a Taliban commander.

The ride back to the Special Forces firebase took most of the day. A few hours after we returned to the base, the soldiers were complaining outside the team room. They told me that griping from elite Afghan circles about Wadud’s capture had been directed toward the U.S. Embassy in Kabul — which then called the Special Forces task force. I was not able to verify this claim, but the team was angry and frustrated. I never got to the bottom of exactly why there had been lobbying to free Wadud, but at the 11th hour, the captain successfully petitioned to keep him in custody after Wadud admitted his job was to find safe houses for Taliban commanders. A small victory.

For me, this was a valuable but troubling first glimpse of the other war being fought here: the one behind closed doors. The balance between soldiers trying to win on the battlefield and politicians and diplomats trying to rebuild a country — with all the political maneuvering that required — would prove ever-difficult for Americans to navigate.

Armed security guards stand watch at a guesthouse in the town of Istalif. (Dudley M. Brooks)

II. Kabul, 2019

The Afghanistan mission certainly had its share of well-known generals. Remember Gen. Stan McChrystal? Gen. David Petraeus? McChrystal, who commanded NATO forces from 2009 to 2010, was the warrior monk who lived on one meal a day. He was replaced by Petraeus after Rolling Stone reporter Michael Hastings wrote an unflattering portrait of him and his staff. Petraeus saved the war in Iraq and arrived in Kabul with a reputation as an insurgent fighter. Neither general, however, was able to win the war in Afghanistan.

Miller arrived in Kabul in September 2018 without the same public image, but with a mandate, essentially, to succeed where his predecessors had failed. As the Trump administration put it in a report to Congress in June 2019: “The principal goal of the South Asia Strategy is a durable and inclusive settlement to the war in Afghanistan that protects the United States homeland from terrorist attacks.”

Much of Miller’s résumé is foggy because most of his career was “behind the fence” — a euphemism for serving with Delta, the Army’s tier-one Special Operations unit — but he has fought on every notable battleground of the past three decades (Afghanistan, Iraq and Somalia) and served as the commanding general of the secretive Joint Special Operations Command (JSOC), which oversees America’s black operations. He’s the “most phenomenal general you’ve never heard of,” says Linda Robinson, a senior researcher at the Rand Corp. “Miller has never attempted to create a cult of personality,” she notes. “He is not an egotist.”

I spoke to a few people who worked with Miller at JSOC and other commands, and everyone had the same comments. Smart. Driven. A good leader who cares about his people. They spoke on the condition of anonymity; most were still part of Special Operations units and weren’t authorized to speak to the press. “He is one of the great battle captains of post-9/11 history,” said a former senior commander in Afghanistan who served with Miller. “He is an extraordinary special operator. Lots of quality time in Afghanistan and not just doing counterterrorism. He is doing the best he can with the resources he has been provided.”

Miller attends a lot of meetings, but few are as important as his three weekly update meetings. At one I went to, he sat at the center of a horseshoe table in front of a bank of flat screens. On the center screen were briefing slides, on the left side the video feed. Miller began the briefing by offering condolences for a Special Forces medic who had been killed during an operation against the Taliban. He said the death was a reminder that Afghanistan is still a high-risk combat environment. For the next 45 minutes, the meeting whipped around the country with generals giving updates. When it was time to brief, a commander — sometimes an American, often a NATO member — appeared on the screen.

A few days later, I interviewed Miller in the headquarters’ meeting room and asked him what he thought of the job. “You know that you will be tired at the end of it — and with a diminished reputation,” he said, then made clear he was joking. “So, I came in here with a level of understanding the challenges and difficulties, particularly after the United States involvement for close to two decades here.”

In 2001, Miller was part of the Special Operations forces that stormed into Afghanistan. But in our interview, he admitted he didn’t understand the country then. “If you really start thinking you’re getting a real clear grasp of Afghanistan, you probably aren’t,” he said. I found that perspective refreshing.

Afghanistan was a war of missed opportunities, and Miller was set on not missing another one. He had taken a hatchet to all the different victory goals of the past and was focused on only two things: a political settlement for Afghanistan and protecting the U.S. homeland by conducting anti-terrorism missions. “We all have to understand why we’re here,” Miller told me. “And if we have everyone focused in the right direction, it comes down to a political settlement.”

While U.S. envoy Zalmay Khalilzad continues to negotiate a deal, Afghan forces — helped by American advisers — hammer the Taliban, reminding them that the only path to peace is at the table. Dubbed the “black cloud,” Miller’s strategy focuses on keeping forces agile and constantly moving. Drones, bombers and U.S. and Afghan troops hunt down Taliban and Islamic State members in one province for a few days until the enemy leaves, and then they move to more-fruitful hunting grounds. The strategy has led to unprecedented numbers of Taliban killed.

“They notice the uptick,” Miller said about the Taliban. “At the tactical level, you see them adjusting how they’ll communicate, you see how they adjust, how they move across different districts and provinces. So, we do know it has had an effect, but none of this is about body counts. None of this is about killing your way to victory.”

The prospects for a political settlement get most of the attention, but protecting the homeland is the litmus test that guides Miller’s strategy. It means, essentially, ensuring that Afghanistan will not again become a haven for terrorists who want to attack the United States. It also means that our Afghanistan strategy has now come full circle since Miller first arrived here in 2001.

III. Khost province, 2007

In the summer of 2007, I embedded with American paratroopers from the 82nd Airborne Division in Khost. The province — home to 1 million people then — was a strategic crossroads where al-Qaeda and Taliban fighters slipped easily in and out of neighboring Pakistan.

The previous year, Khost had been plagued by suicide bombers. But in 2007, violence had decreased. Lt. Col. Scottie Custer, an 82nd Airborne Division artillery officer, was one of the architects of the turnaround. Instead of keeping his troops at Forward Operating Base Salerno — the hub of U.S. military activity in Khost — Custer was sending them to smaller outposts in the province’s 11 subdistricts.

The strategy worked: When the paratroopers moved in, the Taliban moved out. Insurgent attacks and roadside bombs dropped significantly; intercepted Taliban radio transmissions instructed fighters to stay away from Khost. With security came stability. Custer partnered with the local governor and the provincial reconstruction team to start pumping money into the province, which brought schools, dams, roads. The Khost reconstruction team spent $17 million on projects in 2007, compared with only $6 million in the three prior years. Some of that money paid for nearly 100 miles of paved road in a country where most roads were just tire tracks.

Before I flew back home, Custer was optimistic, and his optimism was infectious. The paratroopers had solved the riddle, he thought. “It is Afghanistan,” Custer told me, by which he meant that nothing works like you plan it, and nothing is easy. “But we are going to hand off Khost a lot better than we received it.”

“We all have to understand why we’re here,” Miller told me. “And if we have everyone focused in the right direction, it comes down to a political settlement.”

At the time, Custer’s strategy really did seem viable. News stories praised it as the way forward. Richard Holbrooke, a former U.S. ambassador to the United Nations who went on to be Obama’s special envoy to Afghanistan, called Khost a “success” in an April 2008 column. It was the first time since 2004 that I felt like there was a chance the war might end with a victory. Days before I left Khost, I wrote this for the Fayetteville Observer in North Carolina: “Reconstruction aid is flying in, security has drastically improved and for the most part Khostis are happy. They are also busy building multi-story buildings in town and barracks on Forward Operating Base Salerno. Afghanistan can be won; it is just going to take a lot more work and resources.”

A year after I visited, Custer was gone and the wave of suicide bombings returned; among the places attacked was Salerno itself. Of course, even if Custer had stayed, things might not have worked out over the long term. But the constant rotation of personnel did not make things any easier. And this happened all over Afghanistan.

Brian Glyn Williams, a University of Massachusetts at Dartmouth professor of Islamic history who worked with the U.S. military in Afghanistan in the summer of 2009, witnessed how the rotation affected operations. He was working with an information operations cell in Kabul when half the team rotated out. “We had personal relations with the gray beards,” Williams said, referring to Afghan elders. “We sort of had a rapport with them. A rhythm. It took a long time to build up that institutional memory for our team. But part of my team switched to Iraq. You’re calibrated to work in one environment, and then they’re deployed to Iraq. All of that institutional knowledge was flushed.” The United States, in short, fell into a pattern of one-year deployments, meaning the war started over every 12 months. America’s longest war turned into 18 one-year wars.

A dozen years after Custer’s efforts, Khost is still a battleground. In November, a suicide bomber killed 26 people and wounded 50, all members of Afghan security forces who had gathered for Friday prayers in the Ismail Khel district of the province. In July of this year, Afghan forces clashed with Taliban fighters; a dozen were killed and 10 were wounded in the fighting. In August, two bombs injured nine people, including two police officers, in Khost city. A few days later, a Taliban suicide bomber attacked a market in the Mandozai district, killing two civilians and injuring seven more.

A wounded Afghan man is brought to an Italian aid organization’s hospital after an explosion in Kabul in May 2019. (Wakil Koshar/AFP/Getty Images)

IV. Kabul, 2019

On my first trip to Kabul, in 2004, I could walk the streets, go to restaurants and shop in the markets. I liked to spend a day or two on each trip buying souvenirs for friends and family and enjoying drinks and dinner at guesthouses in the city. On one trip in 2016, I spent a night on the back of a truck as we went to the market and then dinner.

But today, Kabul is a city of concrete and checkpoints, meant to ward off attacks like August’s suicide blast that killed 63 people in a wedding hall. Government buildings and embassies are protected by massive barriers. Hotels have quarantine areas where armed guards search cars going in and out for bombs. Concrete walls line the streets, making it impossible to see into compounds.

The new era began in 2014, when 21 people, including 13 foreigners, were killed at Taverna du Liban, a Lebanese restaurant popular with diplomats, U.N. staff and aid workers. A suicide bomber detonated at the restaurant’s gate, and then two gunmen rushed in and opened fire on the stunned diners.

On my most recent trip, I talked to a Special Operations officer who works with a team that partners with Afghan security forces. (He spoke with me on the condition of anonymity because of the sensitivity of his mission.) His team is made up of about 30 troops from various countries focused on keeping Kabul safe. It’s a difficult job made more difficult by the fact that Kabul’s population has swelled to more than 5 million as the rural areas of Afghanistan have become more dangerous or fallen under control of the Taliban.

We were standing outside the Maiwand Wrestling Club in Kabul as the Special Operations officer described an attack that had killed 26 people in September 2018. The Dasht-e-Barchi neighborhood on the western side of Kabul is home to the ethnic Hazara community, a mostly Shiite minority that has long been targeted by the Taliban and now the Islamic State. On that day in September, an Islamic State suicide bomber had climbed out of a car, taken a last drag off a cigarette and approached the gym. He shot a security guard at the gate and headed inside. When wrestling coach Maalim Abbas barred the steel-plated door to the gym, the bomber set off the device. The Special Operations officer pointed out the path the suicide bomber followed into the gym, the area of an outer wall where a gate used to be, and the location of a car that exploded after first responders arrived at the scene.

“It’s not easy to execute a remote detonation,” the officer said. “Even a command detonation is hard. It takes some coordination.” High-profile attacks like this one remind Afghan civilians that the government can’t protect them, the officer explained.

The gym attack was just one example of the ever-present threat to Afghanistan posed by Islamic State-Khorasan Province, known as ISIS-K. ISIS-K arrived on the Afghan battlefield in 2014 — swearing allegiance to the core Islamic State in 2015. It’s made up of splinter Taliban groups from Afghanistan and Pakistan that came together under the black flag of the Islamic State because they were disillusioned by the way the war was going. (Also, the Islamic State paid fighters more than the Taliban.) Once ISIS-K was born, the core organization provided them with rules and guidelines for building their caliphate. One American intelligence analyst compared joining the Islamic State to buying a McDonald’s franchise: It’s your store, but the golden arches are going to tell you how to run the place.

ISIS-K recruits are usually young men, educated believers with specific skills like video production or practicing medicine. If they don’t have the skills, the Islamic State will send them to school for training. For example, the organization needed someone to run an X-ray machine, so it recruited a student and sent him to Kabul University to learn how to be an X-ray tech. Not only did recovered letters — with Islamic State letterhead — show how much the man was paid, but photos showed an X-ray machine in a village high in the mountains.

Unlike al-Qaeda, the Islamic State is at odds with the Taliban. Since 2014, ISIS-K has fought against the Taliban as both groups vie for control over the insurgency against the Afghan government. Last year, the Taliban claimed it killed 153 ISIS-K fighters, wounded 100 and captured 134 in a campaign to clear northern Afghanistan of the group.

While the Taliban and the United States have been talking peace, the ISIS-K threat has grown. And intelligence officials in Miller’s headquarters fear peace will drive the Taliban’s more fanatical fighters into ISIS-K’s ranks. That’s why the hope is that any troop drawdown won’t include Special Operations teams working against the Islamic State. “The Taliban want Afghanistan,” said the officer who explained the gym attack. “They want their country back. The Islamic State wants to change the world map.”

From left: U.S. Army Gen. Austin “Scott” Miller before a meeting at NATO headquarters in Brussels in 2018 (Francisco Seco/AFP/Getty Images); a defaced billboard depicting Hamid Karzai, former president of Afghanistan, in a hallway of a guesthouse at the Kunduz governor’s compound in 2015. (Andrew Quilty)

V. Daikundi province, 2009

The Afghan war was never meant for huge, conventional units with tanks; it was always fought one village at a time, which is why the Special Forces’ ability to build rapport with local leaders and Afghan soldiers was at a premium. They are among the Army’s most highly trained soldiers. They might perform a raid with Afghan troops at night and then provide medical care to locals in a village the next morning.

In 2009, the Special Forces launched a countrywide strategy to win over the locals and try to create stability. The new strategy was called Village Stability Operations (VSO), and it thrust Special Forces teams into villages throughout Afghanistan to build local governance. This broke Special Forces out of the cycle of raids, in which U.S. troops were constantly hitting targets but rarely interacting with the populace.

“We’re going to kill the enemy, but that is not how we’re going to win,” then-Col. Don Bolduc told me in 2009 during one of our talks in his office at Camp Brown, in Kandahar. He served more than five years in Afghanistan and would retire as a brigadier general. “This is about mobilizing the populace,” he said. “We’re going to win by securing the populace and preventing the insurgents’ negative influence.”

Shortly after speaking to Bolduc, I got a firsthand look. A Special Forces team in Nili — a village in Daikundi, an isolated province in central Afghanistan — was attempting to build one of the first VSO sites, and the Army allowed me to embed with the group.

The roar of the engines surged as the CH-47 Chinook rose over a mountain and dipped into a valley on its way to Nili. A four-wheeler and pallets of supplies for a VSO team took up most of the deck. We descended into a clearing surrounded by massive mountains. When we landed, the helicopter’s crew pushed the supplies off, and then the Special Forces team drove the four-wheeler toward its destination.

“The Taliban want Afghanistan,” one officer told me. “They want their country back. The Islamic State wants to change the world map.”

Daikundi was still a war zone, but no one was planning raids. I spent the next few days in a civilian truck riding from village to village and meeting with local leaders. The Special Forces team requested funding to repair schools, but they first had to inspect them to see what kinds of repairs were needed. The team also gave soccer balls to the police to give to kids. These kinds of missions were a far cry from searching for a Taliban commander. Same war, different way to fight it.

A year later, Miller took over command of a unit focused on training local forces. “We are about to take community defense to the next level,” he predicted, according to “Game Changers,” a 2015 book by Lt. Col. Scott Mann that chronicles the VSO strategy. “It’s all about local stability, not just security. We have to get local governance right. It’s also about connecting the villages to the rest of the government. What we are providing is a platform, something the rest of the coalition and Afghan government can connect to where they couldn’t before — a village stability platform.”

Soon, not only were Special Forces teams involved, but so were SEALs and even conventional units. Petraeus made VSO part of his strategy and pushed units into more areas. Village Stability turned into 30,000 Afghan local police protecting more than 115 districts.

At the time, Mark, the Special Forces team commander in Nili — whose last name was withheld as part of the ground rules of my embed — embraced the mission. He, like Bolduc, had come to see the fallacy of constant raids. He told me that Special Forces had been too focused on fighting, that raids kill only the “branches” of the insurgency. Victory was winning over people, and persuading them to reject the Taliban and rebuild their country. “We lost our way,” he told me, “but have found it again.”

With the shift to VSO, though, came a new challenge. Not many would-be soldiers sign up to dig wells. Most of the soldiers I spoke with — particularly conventional troops, but also some Special Forces — told me they came to Afghanistan to fight. The soldiers wanted to kick in doors and kill Taliban fighters and al-Qaeda terrorists, not spend hours training local police. “There wasn’t much love for this program early on,” Mann writes in his book. “Many Green Berets preferred to continue targeting extremists instead of living among locals.”

Ultimately, corruption and cronyism, coupled with American impatience, crippled the program. VSO was eventually phased out. The U.S. special inspector general for Afghanistan reconstruction said in a May 2018 report that VSO had “showed early potential during the surge but deteriorated during transition as the program scaled too quickly.”

VSO wasn’t a complete failure, though. John Friberg, a retired Special Forces soldier with four decades of service, argued in a 2016 analysis on the website SOF News that things could have turned out better: “It is unfortunate that the VSO program was not instituted earlier in the Afghan conflict; if it had a longer duration of operation the situation in Afghanistan might be very different today. … Overall, the Village Stability Operations program was a success where it was applied for the short duration of its existence.”

U.S. soldiers view Kabul from a Black Hawk helicopter in 2018. (Dan Lamothe)

VI. Konar province, 2019

Nearly 10 years later, Afghans are still searching for stability. Under the direction of Miller’s team, Afghans have taken a step forward by creating the Afghan National Army Territorial Force (ANA-TF), inspired by the VSO program. Launched in February 2018, this initiative is truly Afghan-led — which is why American advisers didn’t know what to expect when acting Afghan Defense Minister Asadullah Khalid and a small entourage of U.S. troops and Afghan officers went in January to an outpost to inspect one of the newest ANA-TF units.

Khalid blew into his hands and rubbed them together as the Black Hawk flew past a snow-covered mountain on its way to Konar province, a mountainous area that hugs the border with Pakistan. The new effort aims to create a force to fill the vacuum after regular Afghan National Army units leave an area in their hunt for Taliban and Islamic State cells. Unlike ANA troops, who are recruited countrywide and often serve with units far from their hometowns, ANA-TF recruits come from, and serve in, the local community. They know the area and are literally fighting for their villages.

Upon our arrival, 50 Afghan soldiers in formation greeted Khalid and his entourage, saluting as he walked down a red carpet to a fleet of waiting trucks. Soon after, the convoy tore down a dirt track, racing to a small outpost ringed by wire-framed baskets filled with sand that act as walls. Members of the ANA-TF, wearing new army uniforms, were waiting in formation. The company’s commander welcomed Khalid to the outpost. He turned on his heel and goose-stepped back to the formation. Khalid followed and inspected the soldiers, stopping to talk with each one. “You are the people defending the country,” Khalid told them over and over.

Victory was winning over people, and persuading them to reject the Taliban and rebuild their country. “We lost our way,” the commander said, “but have found it again.”

A Special Forces officer (who spoke on the condition of anonymity because of the sensitivity of the mission) and Rand researcher Rebecca Zimmerman are working with Afghans on the program. Wearing a black headscarf, Zimmerman stood to the side with the Afghan media and watched Khalid make his way down the line. “I was pleased,” she told me as we watched Khalid inspect the troops. “They looked a little polished, well-fed. You can’t fake well-fed.”

After talking to commanders, Khalid climbed into a truck, and the convoy headed for a nearby village to visit the family of a fallen Afghan commando while Zimmerman and a delegation of Afghan generals and officials toured the outpost’s barracks and kitchen area. The barracks floor sparkled, and every bed was made. The Afghan generals and officials didn’t trust appearances, though; they pulled at the sheets and spent several minutes in the kitchen checking the food.

Zimmerman and the Special Forces officer were smiling when they returned to Kabul. “You take the wins when you can find them,” the officer said. The best-case scenario, according to Zimmerman and the officer, is the creation of units funded by the Afghan government providing both local security and a connection to Kabul. The national government has trouble keeping a presence in the country’s rural villages — something the ANA-TF can remedy.

Whether the ANA-TF succeeds remains to be seen. But it’s merely the latest attempt to solve a puzzle that, 18 years into the war, the American military has never quite mastered: how to train an Afghan military that is able to provide security without help.

From left: An older resident of Istalif, an hour outside Kabul, in 2004 (Dudley M. Brooks); a teenage girl in Kabul in 2011. (Charles Ommanney/Getty Images)

VII. Kabul, 2016

Sometimes it felt like the whole war came down to one man. No one represented Afghans in the minds of Americans more than former president Hamid Karzai. When I first saw pictures of him, I remember how regal he looked with his signature gray karakul hat and his colorful, striped chapan coat. Washington picked him after the fall of the Taliban to champion the resurrection of Afghanistan.

In January 2016, I went to interview Karzai in Kabul. I was working on a book about a former Afghan interpreter named Hikmatullah Shadman, who started a business and made millions before he was accused of corruption by the U.S. government. (He finally settled this past March, forfeiting $25 million, and his company admitted paying gratuities to two American soldiers.) I wanted to talk to Karzai — who had left the presidency in 2014 — about the case.

After navigating a gauntlet of massive concrete walls and thick iron gates, I got to the final security check outside of his residence. I spotted Karzai in the courtyard, but his security ushered me into a waiting room outside his office. When I entered the room, an Afghan man — in his mid-30s and dressed in jeans, hiking boots and a red blazer — was sitting on the couch. I took a seat underneath a portrait of Ashraf Ghani, the current president. Shadman’s American lawyer sat next to me. We waited a few minutes as aides walked in and out of the room, fixing us with curious glances.

The mid-30s Afghan asked me how many times I’d met Karzai. I told him it was my first time. “I’ve met with him twice,” he said. He was only in the city for a few days. He was originally from Kabul, was a graduate of a U.S. university and was now living in Australia. “Any advice?” I asked.

He smiled and said Karzai was very down-to-earth and well spoken, but he offered the lawyer and me a warning: “He has an established view of certain nationalities.” He didn’t elaborate, but it was clear to me that being an American was no longer an asset with Karzai. His relationship with the U.S. government had started successfully, but it broke down during his reelection bid in 2009. By that point, American diplomats were tired of him and didn’t hide the fact that they were rooting for his opponents.

Karzai, even though he won, blamed voting irregularities on foreigners looking to install a “puppet government.” And things would only get worse from there. Tensions between Karzai and the United States reached a boiling point after Staff Sgt. Robert Bales killed 16 unarmed Afghans in southern Afghanistan in 2012. When Karzai met with families of the victims, he prayed for Allah to “rescue us from these two demons,” meaning the United States and the Taliban.

Outside his office, we sat in silence for a few more minutes until a man in a suit took us into a meeting room with thick carpets and ornate but comfortable chairs. Karzai was standing in the middle of the room dressed in the traditional Afghan long shirt and baggy pants, with a coat pulled over his shirt. He was slight and balding but had a confident air about him.

Karzai controlled the meeting from the start. He cared little about the case I wanted to talk to him about, except when he could use it to make his point. “If this was 2002, my gut feeling would have been in favor of the U.S. justice system,” he said over sips of tea. Later, he said, “I’ve lost faith in the fairness of the U.S. government.”

It isn’t just Karzai who is skeptical of America; many other Afghans feel the same way. “Our future cannot be decided outside, whether in the capital cities of our friends, nemeses or neighbors,” Ghani said after Eid prayers in August. “The fate of Afghanistan will be decided here in this homeland. We don’t want anyone to intervene in our affairs.” Perhaps Afghans have simply heard too many empty promises of victory and peace.

A Shiite shrine in Jebrael in 2018. (Andrew Quilty)

VIII. Kabul, 2019

During my visit earlier this year, rumors of a peace deal had everyone in Resolute Support Headquarters waiting for an announcement from Qatar, where talks were being held. Toward the end of my last day with Miller’s staff, details started to emerge: The Taliban would pledge not to allow terrorist groups to use Afghanistan to stage attacks, and the United States would agree to a troop withdrawal. Specifics were being worked out, but this seemed like the start of a framework for an agreement.

Now, eight months later, Khalilzad, the U.S. envoy, is back at the bargaining table with Taliban negotiators to start a ninth round of talks. So far, no deal has been reached, but there have been reports that a bilateral U.S.-Taliban agreement is close to being struck. (Update: After this story went to press, a Taliban suicide bombing killed twelve, including one U.S. soldier. Subsequently, President Trump canceled previously unannounced talks with the Taliban that would have been held at Camp David.)

Peace has risks, of course. The North Vietnamese agreed to a peace treaty in 1973 to end what was then America’s longest war. By April 1975, they were on the outskirts of Saigon. South Vietnam pleaded for American help, but President Gerald Ford refused. Will something similar happen when the last U.S. troops leave Afghanistan, with the Islamic State or the Taliban playing the role of North Vietnam?

In January, standing in Resolute Headquarters, news from the peace talks felt like a genuine turning point. And yet, for nearly a decade, general after general had talked so often about turning a corner in Afghanistan that I’d begun to ignore it. I told Miller I had a healthy skepticism about updates from Afghanistan. “People are skeptical of things that look different, of promises of commanders that they’re making progress here,” he said. “What I stated upfront was this conflict will end by a political solution. … The intra-Afghan fighting will have to end by a political solution. Neither side can win.”

Before I left for my most recent trip, I called Bolduc, who told me, “Nobody has figured out anything.” The retired Special Forces general lost 69 soldiers during his more than five years in Afghanistan. “The commitment of the president is clear,” he said. “He wants out. I haven’t seen a policy that supports one more casualty.”

Thinking about the future of Afghanistan, my mind drifts back to my first mission with a Special Forces team. It was Sept. 11, 2004, and I was in one of two CH-47s with nearly two dozen Afghan militia and their Special Forces advisers. The helicopters landed outside of a village in Zabul province suspected of harboring Taliban fighters. I followed the men in front as they disappeared into the dust and headed toward cover. The radio squawked as soldiers sent updates. Taliban fighters were spotted running into the hills. Afghan militiamen cleared a nearby house and found weapons.

Toward the end of the mission as we waited for the helicopters to return, I was in the center of the village with the other Special Forces soldiers. All day, the locals — particularly the kids — watched us. A little girl in a red dress and bare feet kept smiling at one of the Special Forces soldiers. He’d smile back, and she’d giggle. Finally, the girl took a few steps forward. The Special Forces soldier — his helmet off but still clad in body armor, with a pistol strapped to his thigh — knelt to greet her. With his right hand, he offered her a piece of candy. She took a few steps closer, tentative at first, until she recognized the treat. Then she took it in her small hands, a smile crossing her lips.

A photographer I was embedded with snapped a photo of that moment. It was a simple gesture that had played out in similar ways in so many wars that came before this one: the kind soldier reaching out to the child living through the ravages of war, her ability to trust still intact. For the few seconds that interaction transpired, I believed that Americans were providing the Afghan people — who’d suffered for decades — a chance to live in peace. I’ve been coming back to Afghanistan ever since, trying to recapture that same optimism: hope for the future of the country; hope — however fragile, however battered by the events of the past 18 years — that all the fighting and suffering and dying were not in vain.

A soldier offers candy to a young Afghan girl in Zabul province in 2004. (Steve Hebert/Polaris)