Sometime after midnight, from an observation post at a small base in Paktya Province, American soldiers watched the battle begin. Tracer rounds streamed into the January sky, followed by the fire trails of rocket-propelled grenades. It was days before the new moon, and no light fell in the mountains of eastern Afghanistan but what leaked down from the stars. Holed up in the valley below, the Afghan police fired wildly, desperately, as though trying to fight back the darkness itself.

The Americans radioed the police. The police didn’t answer. An artillery crew fired illumination rounds, flares attached to parachutes, trying to locate enemy positions. None was re­vealed. Finally, the Ameri­cans sent a convoy of soldiers speeding into the valley to support or save their allies or at least se­cure the dead. When the soldiers ar­rived, the policemen were hang­­ing out.

“What’s up, dudes?” the police said.

“What the fuck happened?” asked the soldiers.

“We were attacked by about 50 fighters. But everything is cool now.”

The Americans looked around. They saw no evidence of an attack, no bodies, no bullet holes in the walls. Only darkness like the bottom of the sea. After a while they returned to their base, a place called Wilderness, and sank back into their beds, puzzled and perhaps a bit envious.

Somehow the artillery fire hadn’t woken me, and neither had the grind of armored trucks racing out and returning. I learned of the action the next morning from soldiers in the chow hall. They had been laughing.

In the base operations center I asked a sergeant about the attack.

“It was probably the Hash Monster,” he said.

“The what?”

“You’ve never heard of the Hash Monster?” He spit brown tobacco juice into a plastic bottle. “Sometimes it comes out at night. But it’s tricky—you can only see it when you’re hiiiiiigh.”

Strange stories I’d encountered during a month and a half in Afghanistan suddenly made sense. Stories Americans told with a wink, of police stations mysteriously exploding and battles fought by lionhearted Afghan soldiers against unseen hordes. Of ammunition boxes emptied, red-hot gun barrels, miraculous escapes. Of a formless, elusive enemy who left nothing behind but the soil-sweet scent of pot.

“Does the monster come often?”

“Well, now.” The sergeant grinned. “There are some things the army doesn’t want me to talk about.”

The American soldiers stationed at Combat Outpost Wilderness were nearing the end of their yearlong tour. A few months previously, their job had changed from combat-­oriented missions, including hunting Taliban and other anti-Afghan fighters, to training Afghan security forces. Mostly the Americans worked with the Afghan National Army, the ANA; occasionally they worked with the police. It was a chaotic, dangerous, sometimes absurd task, and by the time I visited them, early this year, the Americans were generally interested in two things: going home, and not leaving a mess for the unit that would follow them. De­parting Afghanistan would inevitably occur. Like the movement of tides, tired units would be replaced with fresh ones. The second part, about the mess, would be hard.

Wilderness was a ramble of shipping contain­ers and plywood shacks wedged into a small ravine in what is called the K-G Pass. Through the pass, which follows a river named Shabak Kheylo, runs the only road connecting the city of Khost to the east, in the province of the same name, to the city of Gardez in the west, the capital of Paktya. It is a strategically important route, and a large road-improvement project was under way in the pass when I traveled there. In the late 1980s, the Soviet Army fought their last major battles in the K-G, trying to break a muja­hideen siege of Khost City.

The landscape had not changed since the Soviet war. Ancient villages of mud and stone, luminous emptiness. Old shell craters, like holes in a memory. Some of the mujahideen who had fought the Russians now fought the Americans. One of them was Jalaluddin Haqqani, founder of the so-called Haqqani Network, an insurgent group once heavily subsidized by the United States but now allied with the Taliban. His home village lay only a few kilometers from Wilderness; American soldiers regularly spoke with his relatives. Haqqani, elderly now, remains one of the country’s most wanted men. Some believe he introduced the tactic of suicide bombing to Afghanistan.

In the spring of 2009, soldiers from Wilderness built a small patrol base in a remote mountain pass even closer to Haq­qani’s village. Insurgents had fired dozens of mortars at Wilderness from the spot, and the Americans wanted to clear the area. They blew up stubborn trees with plastic explosives, dug crude bunkers into the mud, and, wrapped in heavy, stinking shells of body armor, carved a road into the rock with picks and shovels. They named the base Devoe, after a dead comrade. Then, on a moonless night, a group of 50 or more fighters—probably Haqqani’s—attacked the outpost and almost overran it. Thirteen American defenders held them off.

Nearly 20 insurgents were killed in the assault. Their forces in the K-G Pass seemed crippled by the losses, at least temporarily, and their commanders apparently realized they were outmatched by the Americans. So they shifted focus, planting more IEDs along the roads, but also boosting attacks on the far more vulnerable Afghan army and police. It made the Americans’ job easier in some respects, more difficult in others, because their mission shifted as well, to training the Afghans. In many ways it became a hated task, the Hash Monster only one of the problems. But training was crucial to the vision U.S. leaders had chosen to pursue—an Afghanistan kept peaceful and stable by its own security forces. On some level, the soldiers knew their success or failure would determine the nature of whatever came after the war.

On a cold, overcast morning, I joined the First Platoon, Charlie Troop, a unit of the 40th Cavalry, as it headed from Wilderness to the Devoe site. Weeks earlier, the soldiers had torn up the base and pulled out; commanders thought they wouldn’t be able to resupply it in winter, when heavy snow shut the roads. But the snow was late, and the Americans planned to survey the site one last time before their replacements arrived. They expected to find that the Taliban had crept in and seeded the place with small “toe-popper” bombs or even large mines. “If it isn’t booby-trapped,” one soldier said, “the Taliban are complete pussies.” We drove out into the dust of the Shabak Valley; ice crusted like sugar in the riverbank shadows. In the distance, blue-shawled women dragged children toward a ribbon of moving water.

The mission was also designed to train ANA soldiers. Sergeant First Class Brent Koegler, the American platoon leader, told me the ANA would practice moving together as a unit, working on basic infantry skills. Later they would enter a nearby village to mix with civilians, fish for bits of intelligence. Show the Afghan face of the war effort. Koegler expected it to be difficult—not because of toe-poppers but because the Afghans had shown little soldiering ability so far and almost no desire to interact with their own people.

The ANA was dysfunctional—tainted in part by old Soviet practices, Koegler said, which kept soldiers from acting or thinking independently. Lower-ranking commanders often refused to do anything without exact guidelines and permission from their superiors. Enlisted soldiers—who often receive only a few months of training—were less likely to act; sometimes they wouldn’t even obey their commanders. From the American point of view, it didn’t help that many ANA soldiers were illiterate, that they decorated their weapons with shiny beads or that some believed wearing black eyeliner helped them see in the dark.

A few days before the mission, I’d watched Koegler and Staff Sergeant Gerry Balboni plan with Afghan soldiers, who smelled of smoke and hadn’t bathed for days. The Americans warned the Afghans that they might run into a group of Taliban fighters. A young ANA lieutenant seemed reluctant. He kept saying, through a translator, “First you must check with my commander.” Koegler replied that it had already been done. The lieutenant nervously scanned their faces. He came from a well-to-do family, and his military training was thin. Koegler and Balboni suspected his family purchased his position in the ANA. The lieutenant repeated his demand for higher approval. Balboni smiled tiredly. He turned to me.

“You see that?” he asked quietly. “He’s terrified.”

“It’s just bizarre,” Balboni continued. “We’ll plan shit out for weeks, train on it, and then it’ll fall apart for no fucking reason. It. Is. Amazing.”

Koegler, finished with the ANA men, joined us. “Some of these guys are absolutely ridiculous,” he said. “But some of them are good. They’re into it. And they think this war is winnable.” He sighed. “Basically, we’re trying to get these guys as squared away as possible so the next unit has something to work with. I think this war’s winnable too. It’ll just take, you know, more than a few minutes.”

Balboni was not so sure. He grinned and rocked on his heels and nodded toward the lieutenant. The future of the Afghan military stood motionless above a map-strewn table, staring into space as though he had just received very bad news.

“All I can say is you shoulda seen ’em when we first got ’em,” Balboni said.

One of the greatest moments of danger I felt in Afghanistan was at a lonely Afghan outpost perched on a knob above the K-G Pass road. The outpost resembled a rotten trailer park—a crumbling building, a few shipping containers. A bored machine gunner in a burrow of sandbags. Cones of canine and human excrement formed a kind of biohazard perimeter in the weeds. The Afghan commander, who’d been told in advance that American soldiers were coming to meet him, had not bothered to show up.

A young Afghan soldier was trying to demonstrate to a group of Americans how his rifle, an M-16 donated by the U.S. government, wouldn’t fire. The soldier swung the rifle around wildly and shook it. Americans ducked as the muzzle floated past them. I ducked, too. Afghans were notorious for accidentally shooting each other and themselves, blowing off toes, worse.

An American took the soldier’s rifle and examined it. Dirt clogged the weapon.

“It won’t shoot because you never clean it,” he said.

The Afghan shrugged. “We don’t have stuff to clean.”

“Of course you don’t,” the American said under his breath.

It was not the first time, or the last, that an Afghan pointed his rifle at me, not really meaning harm. But for some reason the episode enraged me. I had a strange citizen’s epiphany, an unsettling moment of nationalism. I suddenly saw the tax dollars, the reputation of my country, the lives of soldiers and close friends, all spinning down into this great, brown Charybdis.

As we loaded into trucks for the return to Wilderness, even the Americans’ interpreter, an Afghan from Kabul, was fuming. He threw his arms up.

“They are all uneducated,” he said. “They don’t care. Piss me off, man.”

His name was Qais. He was one of the better interpreters.

“They all high on hashish,” he said. “They gonna do something stupid, kill some civilian. This is the national army, man! My God.”

“They’re high right now?”

“Yeah, man! They all.”

He sat back and wrapped his face in a scarf. He could smell the Hash Monster approaching.

In the early winter of 1987, mujahideen fighters in K-G Pass sat waiting for a Russian attack. The Afghans were calm, even confident. The war had been going badly for the Soviets. At the time, money and arms poured across the border from Pakistan, and foreign allies were committed to the mujahideen cause. Inshallah, the Rus­­sians would die or depart. But God’s will was impossible to know, and if by His inscrutable plans the Russians were made to linger, the muja­hideen were prepared for that too. So, as the Soviets massed for what would be their last large-scale offensive of the war, the Afghans waited in their bunkers and dugouts, quietly hidden, imagining glorious ambushes.

A Soviet plane signaled the start of the siege as it flew in and released a swarm of paratroopers. Perhaps it was beautiful. All those parachutes, their slow descent. Such easy targets. Surely the mission would fail—the mujahideen had dug in well, and they emerged to open fire. But as the paratroops thudded to the ground, a genius worthy of the Greeks at Troy was revealed: the paratroopers were dummies, fakes. A reconnaissance aircraft, close on the tail of the troop plane, recorded the mujahideen positions while they shot at the decoys. Soviet jets and artillery then pounded the mountainsides for hours.

Eventually the Afghans were forced to retreat. The dummy drop was later called a strategic “masterstroke,” and it drove the Soviets to a brief victory. But their will had finally broken; the long war had ground them down. Within a few months, the Russians left Afghanistan, and the mujahideen, commanded by Jalaluddin Haqqani, reclaimed the mountains.

The dummies fell not far from Wilderness. One evening I stood in the beige hills, in the straw light of January, listening to Balboni and Koegler describe it. Large black birds floated above us. Americans always spoke of the episode in tones of awe and amusement. While we talked I wondered what it looked like that day to the Afghans, before the ruse was known, the bodies drifting like seed pods, absorbing bullets and shrapnel without reaction.

“Those bastards did some pretty cool shit,” Balboni said.

He and Koegler had come from a meeting with ANA officers. They were tired and covered in dust. Their uniforms, their rifles, their eyelashes.

“The Russians, man, they didn’t care!” Balboni said. “They were like ‘fuck it!’”

He paused, gave an approving nod. Then he joked that there was only one difference between the Russian dummies and those he worked with every day.

“Ours might run away,” he said.

In Afghanistan every soldier or Marine, every civilian, possesses some small piece of the truth. Journalists pull these pieces together into stories, but it is impossible to collect them all. We generally believe, or hope, that others at higher levels and with grander titles have gathered more and see a larger collage of reality. Several soldiers told me that the Afghan army was improving, that it was one of the few success stories. I believed them; I had even visited a shrine of their optimism.

At a large base at one end of the K-G pass, the commander of the area, Lt. Colonel Robert Campbell, had built a joint operations center where American and Afghan soldiers sat side by side at rows of elevated desks. Information from the battle zone poured in, appearing on computer screens and a wall of display monitors. In this room of plywood and electricity, Americans trained their Afghan counterparts in something like real time, sharing everything, working intimately. Campbell said it was the only place of its kind in Afghanistan. Tracking troop movements and supplies, the soldiers watched video from unmanned drones. They prepared daily briefs for the commanding Afghan general who was already nominally in charge. Compared to other Afghan headquarters I had seen, this was the bridge of the Starship Enterprise. No one was even spitting on the floor. Outside, on cool mornings, Afghan soldiers assembled smartly for classes. Policemen flailed at jumping jacks down the road in their own training area. The place was impressive; it was a beginning.

But the same qualities that won praise for the command center seemed to condemn everything around it. The war had begun in 2001; the American withdrawal would commence in 2011. If this site truly provided one of the most progressive military classrooms, what did it mean that the Americans had built only one in a decade, and just before they planned to start packing up? Campbell was intelligent and ambitious, but his tour was ending too. He also told me he had been forced to confront the Afghan commanding general about corruption—a general who would remain after Campbell’s departure.

The shrine stood alone. In the countryside, in most of Afghanistan, there were no computers, little electricity. Classes were what the Americans could teach when the Afghans would listen. Out there, the Taliban or the Haqqani Network needed only small acts of violence to keep civilians afraid and uncooperative. It was to these places that immature armed men, the rawest soldiers, were being deployed and told that the future of the nation was in their hands.