In 1991, as civil war raged in Afghanistan and the ranks of Islamic radicals there swelled, the first President Bush turned to a CIA briefer and asked, puzzled, "Is that thing still going on?"

That chilling anecdote is recounted in "Ghost Wars: The Secret History of the CIA, Afghanistan, and Bin Laden, from the Soviet Invasion to September 10, 2001." The book, by my colleague Steve Coll, is, among many other themes, about America's self-defeating inability to stay focused on anything for very long. This came to mind again Thursday when, in a presidential debate on foreign policy, not a single question focused on Afghanistan, though the United States invaded that country under the current President Bush and still has more than 20,000 troops waging war and keeping peace there.

The candidates did invoke Afghanistan, but more as a symbol than as a real country. Bush repeatedly referred to the importance of a "free Afghanistan"; Sen. John F. Kerry cited it only to underline the folly of having diverted resources to Iraq. Neither simplistic portrait did justice to Afghanistan's mixture of progress and problems, nor to the challenges a U.S. president will face there in the next four years.

Those challenges were brought home last week during a visit to Washington by Afghanistan's finance minister. Ashraf Ghani, who spent 24 years working at the World Bank and teaching anthropology at Berkeley and Johns Hopkins University, understands all too well Americans' short attention span and our desire to move smartly to the postgame score-settling. But Afghanistan can't afford to get caught up in that mentality, he said.

"Getting to stability is not a five-year process but a 10-year process," Ghani said. "Getting to prosperity takes longer."

A lot of good things are taking place in his country, contrary to Kerry's description of an unrelenting downward spiral. Since the medieval Taliban fell in late 2001, the economy has begun to revive. Trade is booming, cities are rebuilding, markets are lively. In recent months the government has made progress toward disarming some of the warlords who control much of the country. As Bush said, millions of Afghan men and women have registered to vote in presidential elections to be held Saturday. "People are a lot happier here now than before, and they are moving toward a modern life," one 26-year-old recently told The Post's Pamela Constable in Kandahar.

But as Constable's reporting makes clear, Afghanistan also has plenty of problems, some of them worsening. Opium production and the corruption it engenders probably rank first on that list; Taliban attacks are increasing in remote areas; intimidation continues of women who seek to vote and girls who attend school; the Kabul government is far from asserting its writ throughout the country.

The Bush administration is partly responsible for these problems, though not primarily because of the diversion Kerry cites. When the Taliban fell, the Pentagon explicitly rejected nation-building, choosing instead to work through warlords who had helped unseat the dictators. Only last year did the administration reverse course. NATO is partly responsible, too, because European countries have been slow to meet their promises to supply peacekeeping troops and even slower to admit that drug lords also must be faced.

Mostly Afghanistan's history is responsible: a quarter-century of civil war that forced millions into exile and destroyed much of the nation's infrastructure. "What used to take two hours driving now takes six hours," Ghani said.

The professor-turned-workaholic-minister said that average per-person annual income grew from about $200 to $240 in the past year. In seven years, if these "miracle rates" of growth continue, he hopes to reach $500. A country with $1,000 average per capita income, he said, no longer engages in drug production.

Ghani has a vision for how such growth can be achieved. It depends on democracy and decentralization, and on maintaining flows of foreign aid without creating a foreign-aid culture in which U.N. drivers earn 10 times as much as health ministry bureaucrats.

It depends, too, on whether the West can keep Afghanistan in its thoughts before it becomes a crisis again. So far, he said, the Bush administration's attention "has really not wavered," but the media mostly have proven unable to handle two major stories at once. Attacks, assassination attempts, elections -- these are covered, but not "the fluidity, and the range of possibilities."

And that range is enormous, he said, and of enormous consequence: on the one hand, a democratic Muslim country at the crossroads of Central Asia that wants a partnership with the West; on the other, conflict, fundamentalism, narcoterror. With a professor's understatement, Ghani concluded: "Both the opportunity and the threats are very major."

fredhiatt@washpost.com