View Images Lounging in his parents’ bedroom, Arshid, 10, plays a game on his dad’s smartphone. Three generations share this fifth-floor apartment, which has running water and central heating, luxuries in a city where at least 70 percent of residents have minimal services.

A version of this story appears in the January 2018 issue of National Geographic magazine.

On Fridays residents of the Khwaja Rawash apartment complex in Qasaba, a neighborhood at the foot of Kabul’s northern mountains, climb to their rooftops to fly kites. But on one recent afternoon they stood watching a more ominous sight: plumes of white smoke curling skyward after Taliban mortar shells launched from the mountains to the north hit the airport nearby.

Qasaba is on the farthest outskirts of Kabul, and that’s the point: to keep the war that has plagued Afghanistan for nearly two decades at arm’s length. Khwaja Rawash, which opened in 2017, is home to some 9,000 tenants from an Afghan middle class that has been bolstered since 2001 by foreign aid and military contracts. Now with the departure of foreign troops and with downtown Kabul increasingly under attack from Taliban insurgents, many middle-class residents are choosing to move to the outer edge of the capital.

View Images Suliman (at top left in gray pants) and his siblings, with their caged pet partridge, spend time outside their apartment block. Kidnappings are a growing problem in central Kabul, but Qasaba is safe enough that parents let their children roam more freely.

Apartments here have running water and central heating, a luxury in a city dominated by slum housing heated by polluting woodstoves, and the air is cleaner than it is downtown. Outside, women walk freely and socialize over ice cream, a sign of liberalism and security.

Abdul Kabir Ziarkash greets me at the door to his apartment in Khwaja Rawash. At 71, the former communist who spent four decades as a government meteorologist before retiring is lean and has the hoarse voice of a lifelong smoker. He wears an embroidered white robe and keeps his mustache neatly trimmed and his white widow’s peak slicked back.

Two other generations live here with Ziarkash and his wife, Parwin: their youngest son, Aimal, 34, and daughter-in-law, Khalida, also 34, and their two sons. They’re a proudly modern family. Aimal and Khalida met at college while studying computer science, and they married for love, unlike most couples of their generation. Aimal allows Khalida to work, as a teacher at a girls vocational school. She’s been the family’s breadwinner since American funding dried up for Aimal’s construction job.

During my visit the women join photographer Andrew Quilty and me with the rest of the family for lunch—an exquisite, mouth-watering spread of traditional Afghan stews, meats, and fruit. For women to eat with unrelated men and without head scarves is unheard of in most Afghan families.

Yet modernity hasn’t affected their traditional family hierarchy. Khalida, as the youngest woman in the house, also cooks, cleans, washes dishes, and takes the sons to the playground. “I don’t have a lot of free time,” she says with a smile. Aimal, who has given up looking for a job, spends much of his day playing video games with the boys.

View Images Three workers pose for a photo near a construction site. Although Khwaja Rawash already counts some 2,000 apartments in 78 blocks, more are being built. With worsening security in Kabul proper, real estate on the outskirts of the city is attractive. But if the conflict escalates, this haven of the comparatively wealthy could also become a target.

Black-and-silver faux-leather sofas dominate the living room, where Ziarkash drags on slim Dunhills while watching an Indian crime comedy on TV. He reminisces about the 1960s and ’70s—periods of relative stability and democratic reform in Afghanistan.

“It was nothing less than Paris,” he says. “Our country is broken,” Parwin chimes in, “but we try our best to make a good atmosphere inside the house.” In the children’s bedroom, Arshid, 10, and Rashid, eight, sleep on Mickey Mouse bedsheets. Marvel stickers decorate the walls, and a cage with two canaries takes up most of the bedside table.

Meanwhile, outside the family’s window, foundations are being laid for a mosque. The planners had promised to build a playground, Aimal says, dreading the prospect of being woken up by the 5 a.m. call to prayer.

“We ran away from the mosques—now they’re following us,” says Ziarkash, seemingly only half-joking about how the mullahs want to make sure atheist ways don’t take over.

Kabul: Shaped by Conflict

Khwaja Rawash is the latest addition to a city whose architecture tells of its history. From its chaotic old town, Kabul expands into webs of dusty streets running between rectangular, walled compounds that on the eastern side of the city give way to run-down industrial complexes. Slums creep up hillsides to accommodate a population that tripled to more than 4.5 million between 2001 and 2015.

After 2001, when the fundamentalist Taliban regime was forced from power, millions of Afghans returned to their home country, from Iran and Pakistan in particular, and many rural residents flocked to Kabul.

U.S. and other foreign investment kept the city from becoming an infrastructural disaster. Today its streets bustle with battered Toyota Corollas, street kids hawking wares, fruit peddlers, and schoolchildren. Mansions painted in pastel colors dot the cityscape—one sign that funneling massive funds into a largely agrarian country has disproportionately benefited a small elite in the capital.

“Unfortunately the government hasn’t been able to secure the provinces,” Ziarkash says, referring to the Taliban’s grip on many rural areas. “That’s why people continue to come here.”

View Images Arshid is first in place in the dining room as his father, Aimal, and grandmother, Parwin, lay out a lavish lunch. On Fridays and holidays Afghan families gather over big meals, such as this feast of dumplings, meatballs, and stews of okra and eggplant.

But his family doesn’t think the influx is all bad. Living close to people from other backgrounds can help smooth ethnic tensions that pervade Afghan society, they say, adding that they, a Pashtun family, often hang out with the Uzbek family on the fourth floor. “Well-educated people think migration is good,” says Ziarkash’s sister, Sima, who is visiting for lunch.

In sharp contrast to the open, airy neighborhood of Qasaba, the city center—crowded with heavily guarded embassy compounds, military headquarters, and government ministries—has become practically “uninhabitable,” says Jolyon Leslie, an architect who has worked in Afghanistan since 1989. That’s “except for the über-elite whose feet don’t touch the ground because the streets have been cleared for them.”

Decades of conflict and changing methods of warfare have molded Kabul. Neighborhoods are no longer only pummeled from the outside by rockets. Instead the war has become increasingly “vehicular borne,” Leslie says, be it with armored NATO vehicles muscling through downtown or cars with suicide bombers whose explosives seem to get bigger as foreigners retreat farther behind blast walls.

View Images Girls play on a rudimentary swing on the dusty playground next to their apartment block in Khwaja Rawash. The clean, modern enclave, separated from the rest of Kabul by the airport, has a calm, family-­friendly atmosphere that’s rare for Afghanistan.

“Suddenly vehicles become weapons,” Leslie says. “Streets become risks. It changes the nature of urbanization.”

Kabul’s diplomatic quarter lies within a secure “green zone” that is being more than doubled in area to include all embassies, as well as the NATO and U.S. military headquarters. A new blue zone, with traffic restrictions, will encompass much of the rest of the city center and the airport. Downtown landmarks such as the presidential palace are largely inaccessible to ordinary Afghans.

“I would like for everyone to see the palace, to know it’s part of their culture,” Ziarkash says. Parwin nods: “It would be better if the embassies moved outside the city.”

To Leslie, international organizations such as the United Nations still treat Kabul as if it weren’t a city in the middle of a war but rather as a place that can be put on the right track with just a little more development aid and a little better planning.

View Images Separated from downtown Kabul by the airport and its security perimeter, and flanked by mountains to the north, Khwaja Rawash is at arm’s length from the crime and violence plaguing the capital.

“What’s interesting,” he says, “is that Kabul is following a trajectory, almost a pathology, of cities in modern conflict, similar to Baghdad and to a lesser extent Damascus. Mogadishu is another example.” Leslie says there’s an unwillingness to acknowledge that Kabul is “an extremely disabled city. Somehow we still have to pretend that everything is going to be better with sanitation, wider streets, and more trees when, actually, that isn’t the underlying problem.”

The fundamental obstacle for progress in Afghanistan is not a lack of development money but the government’s inability to secure the country.

One outcome of an escalation in the war between the Taliban and the Western-backed government is that it could threaten Qasaba’s calm. There is precedent. Mikrorayons, building projects similar to Khwaja Rawash that embody a bygone era of Soviet support for the former communist regime, became a target of armed factions in the civil war during the 1990s.

If today’s conflict does intensify, the same could happen to Qasaba, a refuge for the relatively wealthy who have benefited from the influence of another outside power, the United States. “It’s pretty vulnerable,” Leslie says.