For decades, the dusty streets and bazaars of the Afghan capital have been the final resting place for thousands of shipping containers, the bulky metal boxes that carry cargo around the world on trucks, trains and ships.

Those that had delivered their last loads and outlived their usefulness were rounded up in countless foreign depots by private firms and sold in developing countries such as Afghanistan, where they would be turned into shops, garages and even homes, their incongruous CSX or SeaLand markings often covered with mud or blankets for insulation.

Over the past year, however, as foreign governments and aid groups have dispatched workers to assist with the reconstruction of post-Taliban Afghanistan, the phenomenon of shipping-container living has taken an upscale turn here in Kabul. The largest collection of containers is no longer found in the city's machine-parts neighborhood but on the expansive, heavily fortified grounds of the U.S. Embassy.

More than 100 are arrayed around the embassy compound, some providing housing for one to eight people, others serving as a recreation center, a laundry, a cafeteria and even the ambassador's residence.

"You know, I think most people like them," said Matthew A. Weiller, the officer in charge of logistics for the embassy. "We needed to have housing for people fast, and this was the best way we could find."

Weiller explained the situation from the 17-foot-long by 8-foot-wide comfort of his own "hootch," as they are called at the compound. One shipping container usually gets divided into two hootches. Each contains a single or bunk bed, a small refrigerator, a heater/air conditioner, a shower and toilet, a sink, a microwave and, this being U.S. soil, a television.

"It certainly isn't up to the standards of other diplomatic postings, but it meets my needs and I have no complaints," said William Taylor, the U.S. special representative to Afghanistan for reconstruction.

When the Taliban was toppled in late 2001 and the United States returned to an embassy that had been shuttered since 1989, arriving diplomats found plenty to do but nowhere to live. Security concerns dictated that they live on the embassy grounds, yet no housing had ever been built there, except for an underground bunker used only in emergencies. Diplomats were forced to live in their offices, in the embassy basement or in tents.

Half a shipping container, with enough hot water for a five-minute shower, suddenly seemed very good in comparison. So the embassy contracted with a firm based in Dubai to supply refurbished containers at a cost of $13,000 each, according to Brad Olson, a construction manager for the embassy building project.

Containers cost about $2,300 brand-new, Olson said, and the extra cost stems not only from the remodeling but from having them shipped to Afghanistan, a trip that involves travel along dirt roads with potholes the size of craters. Red Sea, the Saudi-owned company that supplies them, sometimes uses new containers, but sometimes fixes up older ones that have already carried their share of toys, televisions and building materials.

"It's a helluva lot better than what was here before, and better than what most of us were expecting when we headed out to Afghanistan," said Alberto Fernandez, public affairs officer for the embassy. "People get their own rooms and a microwave, and that's pretty darn nice." In fact, although diplomats in Kabul for a full-year assignment do get their own rooms, some short-timers have to share their containers with as many as three others.

Taylor, the reconstruction envoy, said he was pleased to read recently that a shipping container chic has begun to emerge in New York, which means the Kabul embassy apparently is far ahead of the curve. But when a senior official with the Office of Management and Budget traveled to Kabul and visited his quarters, he was reminded that trendiness is subjective. "She was horrified and said it was so depressing," Taylor said. "So I guess people will have very different responses to our little hootches."

All the containers in the embassy compound are a bright white, and all are covered with a layer of sandbags for protection from rockets. To relieve the industrial motif that the containers gave to the compound, people have added distinguishing features. A plastic pink flamingo and bird feeder were placed in front of one hootch; one cluster of hootch residents planted some tentative-looking shrubs and bushes, and another arranged several containers so that a shared front lawn of sorts can serve as a public square in the warm weather.

By far the most extensive and artfully designed hootch belongs to Ambassador Robert Finn who, after all, needs space to entertain congressional delegations and heads of state, as well as for his living quarters. Three containers were used to create his relatively palatial hootch, with a formal dining room that can seat eight, a front sitting room and a side lawn. A wooden fence around the ambassadorial residence gives it privacy and a suburban hominess.

An apartment complex with more conventional housing is planned for the embassy compound, and some diplomats may be able to move in as early as mid-2004, Weiller said. As the need for the containers declines, they will gradually be discarded or sold off, some doubtless finding their way into the parts of Kabul that the containers have been walled off from since their arrival and joining the thousands of other containers that shelter needy Afghans.

U.S. Embassy logistics chief Matthew Weiller, of Arlington, shows off the "housing" for Foreign Service officers at the embassy compound in Kabul.