KANDAHAR, Afghanistan — Floating over the tightly clustered homes and streets buzzing with rickshaws is the most visible symbol of the fading Western legacy in this onetime fortress of Taliban rule: a giant white balloon, bristling with photo lenses and listening equipment. The surveillance blimp is tethered to the former home of the Taliban leader, Mullah Omar, which for the past 13 years has been a base for the C.I.A. and the Afghan paramilitary forces.

Officials say there are no immediate plans to close that complex, the last Western military base inside the city limits. And so, what remains of the Western presence is marked by this all-seeing eye, watching over Afghanistan’s second city as it jolts into an uncertain post-American future.

For years, Kandahar has been a testing ground for Western counterinsurgency ideas. The first American troops arrived in late 2001, seizing control of a city where Mullah Omar had once, in a dramatic flourish, wrapped himself in a sacred cloak and declared himself the “leader of the faithful.”

Now, the Americans and other foreign troops are gone, mostly, departing in a procession of planes that has emptied Kandahar Air Field, the sprawling military mini-city on the city’s eastern edge. They leave behind a skittish city, torn between fear and hope. A fragile peace is holding, with heavily armed police on virtually every corner, but there is also a sense of regret for the lost opportunities of the past decade, and apprehension that what gains have occurred may be rapidly wiped away. Gleaming four-wheel-drive vehicles pack the courtyards of auto showrooms on the city’s outskirts, where the lines of dust-smeared shops meet the sandy desert. These sport utility vehicles, many of them armor-plated, are the transport of choice for the minority of Afghans who have profited handsomely since 2001 — the contractors and con men, politicians and drug smugglers. The most powerful of them have fit several of those descriptions at once, although not all have survived to tell the tale.