The last time I saw Hakim Taniwal, I thought he was a dead man walking.

A slight, aging sociology professor with gentle manners, Taniwal returned to his homeland from exile in Australia after the fall of the Taliban to help build a new Afghanistan. When I ran across him in the spring of 2002, he had been dispatched by Hamid Karzai, the new Afghan president, to the untamed frontier to take over as governor and dislodge a brutal local warlord who ruled over these parts. Taniwal had no guns, no army and seemingly no chance. It seemed like a suicide mission.

When I saw him again here two weeks ago, he was sitting in the provincial governor's office and the warlord was somewhere in the countryside, out of power, his militia largely disbanded. I reminded Taniwal of our first meeting, when he could not even get into the governor's house because it was occupied by the warlord's family and dozens of his thuggish guerrillas, bristling with Kalashnikovs and grenade launchers.

Taniwal looked at me and smiled. "Things have changed," he said with satisfaction.

Indeed they have -- and yet, in so many ways they haven't.

Four years ago this weekend, the United States launched its war to topple the Taliban. Along with my wife and fellow correspondent, Susan Glasser, I spent eight months shuttling in and out of Afghanistan to cover the conflict and its aftermath. At the end of last month, I returned to cover a trip by President Bush's national security adviser Stephen J. Hadley.

Most Americans could be forgiven if they've forgotten that we are still heavily engaged in Afghanistan, overshadowed as it has been by the turmoil in Iraq and the devastation back home along the Mississippi Gulf Coast. But amid a continuing low-grade war against resurgent Taliban forces and the fruitless search for Osama bin Laden, an audacious experiment in nation-building is underway. The final results of the experiment are not in, but they will carry vital lessons for the reach and limits of American power in a new era.

The Bush administration would love to portray Afghanistan as the picture of progress, and there are certainly encouraging, even inspiring developments. Compared to the daily horrors in Iraq, Afghanistan seems a model of stability to many U.S. officials. "Coming here from Iraq, this is like a vacation," said a State Department official who has worked on reconstruction in both places.

At the same time, even the most optimistic Americans here acknowledge that the job of stabilizing Afghanistan is nowhere near finished, and they worry that it might come unraveled again if a distracted Washington averts its attention too soon. It is not easy to wrench a collection of disparate city-states out of the Middle Ages and turn them into a unified, democratic 21st-century nation in four short years. "What we have taken on is to try to create a state that has never really existed," said a U.S. diplomat here. "It isn't going to happen quickly. You've bit it off and now you've got to chew it for a long time."

Taniwal offers a telling case study of the contrasts behind every corner in Afghanistan. Against all odds, through peaceful perseverence he outlasted warlord Bacha Khan in his home city of Khost, from which the ruthless commander lorded over three provinces. But now based in the town of Gardez as governor of one of those provinces, Taniwal presides over a rugged area south of the capital Kabul with precious few tools. He welcomes visitors into an office with no electricity except for the couple of hours when his small old generator runs each evening. The World Bank gave him a powerful new 480-kilowatt generator, but it has sat unused behind his office for the past year because his government has no money to pay for the fuel to run it.

"The needs are very big in Afghanistan," Taniwal observed. "When I want to build something, I'm not able to do it."

The hardscrabble town of Gardez, located near the site of Operation Anaconda, the largest battle of the U.S. war, remains a primitive collection of rundown buildings and crude market stalls. Yet just outside of town, the Americans have helped build a new Afghan army base and a police training facility with modular buildings. The Afghan soldiers who were still wearing plastic sandals and traditional shalwar kameez outfits -- knee-length shirts and baggy pants -- when I left in 2002 are now outfitted in professional uniforms and boots. And dozens of new two- and three-story buildings are being put up by Afghan businessmen north of town, a cluster being called New Gardez.

A day spent driving around Kabul about 80 miles to the north offers a similar clash of impressions. The capital seems more sprawling than ever, teeming with millions of Afghans who have returned home from abroad. The number of cars has multiplied so much that the streets are jammed with traffic all day long. A city that once offered little more to eat than lamb kebabs, rice pilau and mantu dumplings now boasts Chinese, Thai, Italian, Indian and French restaurants.

Construction litters the landscape. Both the Americans and the Iranians are building university campuses. Most stunning, perhaps, is the handful of gleaming new glass buildings. Putting up a structure made of glass amounts to a mind-boggling act of optimism in a city where not long ago nearly every windowpane was shattered by years of rocket attacks.

When I arrived in Kabul for the first time in late 2001, I stayed at the old Intercontinental Hotel, a shell of its former self, pockmarked by war. I slept in a room with sporadic power, no heat, no running water, no showers, no working toilets, no telephones, no Internet and certainly no room service. Just two weeks before I returned to Kabul last month, the nine-story-tall Safi Landmark Hotel and Suites opened its sliding glass doors; it features every modern convenience, including a health club, satellite television and minibars.

Attached to the hotel is a snazzy new shopping mall, the Kabul City Centre,complete with escalators and glass elevators. I watched as a woman in a burqa figuring out the concept of an escalator approached a normal staircase and waited as if expecting it to move up and down as well. The atrium offers a coffee bar. The first floor is packed with stores selling mobile telephones in a city that a few years ago had practically no working land lines. The next floor up has all the jewelry stores. The whole mall seems so out of place in Kabul that locals wryly call it "Dubai" after the oil-rich emirate that is a shopping paradise for rich Afghans.

At the same time, such glaring symbols of change and foreign investment have little to do with the vast majority of Afghans, who are unable to avail themselves of such pricey creature comforts. A single night at the Safi hotel costs $200 to $350, more than many Afghans earn in a year.

Most Afghans still grind out the same subsistence lives they did under the Taliban, living in mud houses, growing their own food, maybe selling soap or shoes in the bazaar. Poppy harvesting and the drug trafficking it spawns still account for roughly half of the Afghan economy. Corruption is endemic. Many women in Kabul have finally shed their burqas in favor of simple head scarves; nonetheless, more than half of the women I saw on the streets there and virtually all of those I saw outside the capital remained fully covered.

In fact, beyond the hotel and mall, most of Kabul looks no different than it did under the Taliban, a sometimes apocalyptic streetscape. The crumbled sections of town laid waste by fratricidal shelling between warlords in the 1990s are still little more than rubble. The road to the old bombed-out Darulaman Palace offers a tour through the wreckage of decades of war and strife. The thousands of refugees who once took shelter in the cratered old Soviet embassy have been relocated, but the embassy is still in ruins.

If there is a symbol of hope for the future here, it lies not within the glass shell of a new hotel but rather at the end of the road to the demolished palace, where Omar Sultan and Omara Khan Massoudi have been laboring to restore the nearby National Museum of Afghanistan.

Established in 1919, the venerable museum was shelled and looted repeatedly from 1992 to 1995. Then it was ravaged in 2001 by the Taliban, who destroyed 2,500 objects, particularly statues that were deemed heretical because they were graven images of people. Fortunately, the museum's stalwarts spirited away some of the most valuable items, including the fabled gold of the ancient kingdom of Bactria.

Today, thanks to the efforts of people like Sultan and Massoudi, the building has been patched up and repainted, and the remaining art put back on display. For them, it is a labor to save their country. Sultan, an archaeologist by training and civil engineer by profession, returned to Afghanistan after 26 years in the United States, giving up his pension from the North Carolina transportation department to become deputy culture minister. "We have to rebuild our culture," he told me.

Sultan represents an inspiring cohort of the Afghan diaspora that has returned home to try to make a difference. At a small party one evening, he introduced me to his cousin and a friend; both women had moved back from California to try to teach their Afghan sisters how to start their own businesses. One of the women had fled Afghanistan in the 1970s hidden in a shipping container with her tranquilized 31/2-month-old child, while her husband escaped rolled up in a carpet. That such people would ever return represents an act of faith in the future.

Still, what I saw of Afghanistan during my visit struck me like the Restoration Room at the museum, where workers sifted through thousands of pieces of destroyed statues in hopes of reassembling as many as possible. They had no photographs, no models for how the pieces fit together or what the image would look like when they were done. They just kept trying different combinations in a trial-and-error fashion until they found two pieces that went together. Then they picked up some more fragments of their shattered country and tried to piece them together again, too.

Author's e-mail: bakerp@washpost.com

Peter Baker, a reporter on The Post's National staff, covered the U.S. war in Afghanistan from 2001 to 2002.

Transformed: Once-exiled Afghan sociologist Hakim Taniwal is now a provincial governor. Capital contrasts: At left, a man sells biscuits as shopkeepers start their day in Kabul. At right, people in another part of the capital drink coffee in the atrium of a new shopping mall.