For Americans weary of nearly a dozen years of war, Afghanistan often seems like a country where nothing ever changes and the same story of ethnic and tribal struggle repeats itself in an endless loop.

But Afghanistan’s demographics have changed in significant ways over the past decade. Rather than being mired in a perpetual feudal twilight, Afghanistan is actually becoming a modern country. The statistical evidence of change, gathered from sources including data from the U.S. Agency for International Development, is overwhelming. Even discounting for the upbeat tone of the USAID summary of “Achievements in Afghanistan,” there still appear to be important demographic improvements on the ground.

The urbanization and economic development that have reshaped Afghanistan do not mean that the country will have a bright political future or that the Taliban won’t regain a measure of power after U.S. troops leave in 2014. But the future won’t simply be a replay of the past. The Afghanistan movie won’t just restart where it left off when the Taliban were driven from power.

“The Taliban won’t have a free run,” says a senior Indian official in a conversation here about Afghanistan’s future after U.S. troops leave. “This is not 1990 again. Afghanistan is a changed place.”

The most obvious change is urbanization. Close to half the population now lives in cities and towns. Kabul is a city of 5 million people, and the populations of Herat, Jalalabad and Kandahar have all tripled in the past decade. This urbanization weakens ethnic and tribal affiliations and helps women get access to jobs and education.

While still primitive in some rural areas, the country is also getting plugged into the global grid. More than 20 million people, or two-thirds of the country, now have access to mobile phones, up from zero a decade ago. Saad Mohseni, who runs MOBY Group, the country’s biggest media company, estimates that 60 percent of the population watches some television each week, and nearly 95 percent has access to radio.

The billions that America pumped into the country helped foster corruption, to be sure, but the money didn’t all vanish into bank accounts in Dubai. Gross domestic product per capita has increased nearly fivefold since 2002, with an annual growth rate of about 9 percent. Only 18 percent of the population has access to reliable electrical power, but that’s triple what it was a decade ago.

The improvements in health are striking, even after a decade of war. Access to basic health services is available to more than 60 percent of Afghans today, up from 9 percent in 2001. Life expectancy has increased from 44 years to 60 in the past decade; the maternal mortality rate has declined 80 percent; the under-5 mortality rate has dropped 44 percent. The number of primary health-care facilities has increased nearly fourfold.

Afghanistan has rebuilt an education system that had nearly stopped functioning. In 2002, only 900,000 students were in primary school, nearly all boys. Today, 8 million students are in school, more than a third of them girls. University enrollment jumped from 8,000 in 2001 to 77,000 in 2011, and about 20 percent of these higher-education students are women. Literacy is currently about 35 percent, but it’s expected to grow to 55 percent in 10 years and 80 percent in 20, unless disaster strikes.

The gains women have made are an especially visible index of change, but they are also a reminder that progress is fragile and could be reversed by the Taliban. In addition to the vastly larger number of female students, women now hold 27 percent of the seats in parliament, three Cabinet posts and 120 judicial positions. By the end of this year, at least 30 percent of government employees will be women.

Afghanistan is a democracy, too — corrupt and capricious, but for now it’s probably the freest country in the neighborhood, compared to Pakistan, Iran and the central Asian nations. It has a free and independent media, producing everything from an Afghan knockoff of “American Idol” to situation comedies to versions of “Sesame Street” dubbed into Dari and Pashto.

For many Americans, the Afghan War feels like defeat — a painful waste of money and lives. Many people felt that way when the Vietnam War ended, little imagining the economic boom that would eventually come to that country after so many decades of brutal suffering. History is mysterious that way; sometimes the deeper transformations are invisible at the time.

Who can say what the future holds for Afghanistan? Surely, the country’s turmoil and suffering won’t end when U.S. troops depart; the situation may get much worse. But it’s a mistake to assume that nothing changed during America’s years of struggle there, or that many of those changes weren’t for the good.

Read more from David Ignatius’s archive, follow him on Twitter or subscribe to his updates on Facebook.