JOHN HARPER/CORBIS

After the Vietnam War ended in 1975, Hanoi, capital of a now-unified, Communist Vietnam, was a bombed-out disasterscape. Residents lived under an egalitarian reign of terror. The grim ideologues who ran the country forbade citizens to socialize with or even speak to the few foreign visitors. People queued up in long lines past government stores with bare shelves to exchange ration coupons for meager handfuls of rice. The only traffic on the street was the occasional bicycle.

Since then, however, Hanoi has transformed itself more dramatically than almost any other city in the world. Today, the city is an explosive capitalist volcano, and Vietnam is rapidly on its way to becoming a formidable economic and military power. “Many revolutions are begun by conservatives,” Christopher Hitchens once said, paraphrasing John Maynard Keynes, “because these are people who tried to make the existing system work and they know why it does not. Which is quite a profound insight. It used to be known in Marx’s terms as revolution from above.” That’s exactly what happened in Vietnam, though the revolutionaries weren’t conservatives. They were Communists.

Hanoi had a rough twentieth century. The French invaded and made it the capital of colonial French Indochina in 1887. The Empire of Japan seized the city in 1940 and annexed Vietnam to its fascistic Greater East Asia Co-Prosperity Sphere. Ho Chi Minh declared Vietnam an independent state after World War II, and his Viet Minh forces controlled a few scraps of territory, but the French returned in force in 1946 and didn’t leave until Ho’s Communist army forced them out in 1954. Hanoi then became the capital of the misnamed Democratic Republic of North Vietnam. Decades passed in squalor and brutality. Ho’s centrally planned Marxist-Leninist system ravaged the economy, and war with the United States and the American-backed government of South Vietnam—which included aerial bombardment of Hanoi itself—made the devastation complete. More than 1 million Vietnamese died.

The North Vietnamese won their civil war in 1975 and imposed the same draconian economic and political system on the South. Saigon, the South’s former capital, suffered when the North took over. “All the schools were shut down,” says Tuong Vi Lam, who vividly remembers when her side lost the war. “My aunts and uncles were in college and they had to quit. They just couldn’t get there. Property was confiscated and given to northerners. Communist propaganda was even put in our math books. We had questions like this: ‘Yesterday a soldier killed three Americans and today he killed five. How many Americans did he kill total?’ The books don’t have those kinds of questions anymore, but they did for five or ten years.”

Vietnam was finally independent and unified, but it fared no better than the Soviet Union, North Korea, or Cuba—and almost everyone knew it, including many in the Communist leadership. In the mid-1980s, a fight broke out between those who wanted to continue with the old system and those who had already benefited from quiet micro-capitalist reforms enacted in 1979 and wanted to expand them. Southerners made noise about returning to the pre-Communist system that they knew, from personal experience, worked much better. The relative economic success of other Southeast Asian nations, especially Thailand, was obvious even to the ideologues.

The advocates of change won the argument, and in 1986, the government officially abandoned Marxist-Leninist economics and announced the Doi Moi reforms, defined as an attempt to create a “socialist-oriented market economy.” Presumably, party leaders left the word “socialist” in there because they were embarrassed by Marxism’s failures and couldn’t admit that they’d been wrong. Or perhaps they feared that their remaining supporters were allergic to the word “capitalism.” No matter. Vietnam officially junked Communism a mere 11 years after imposing it on South Vietnam.

State subsidies were abolished. Private businesses were allowed to operate again. Businessmen, investors, and employees could keep their profits and wages. Farmers could sell their produce on the open market and keep the proceeds instead of giving them up to the state. The results were spectacular. It took some time for a middle class to emerge, but from 1993 to 2004, the percentage of Vietnamese living in poverty dropped from 60 percent to 20 percent. Before Doi Moi, the command economy contracted, and inflation topped out at over 700 percent; it would eventually shrink to single digits. After years of chronic rice shortages, Vietnam became the world’s second-largest exporter of rice, after Thailand. Progress hasn’t slowed. In 2013, Vietnam’s economy grew by 8.25 percent. “The number of malls, shopping districts, and restaurants is amazing compared with when I was a kid,” says motivational speaker Hoan Do. “Eighteen years ago, the entire country was broken down. There was hardly any technology, but now even poor people can go to an Internet café and log on to Facebook and YouTube.”

The South led the way. “When the Communist leadership decided in the mid-1980s to put Karl Marx and Adam Smith into an economic blender and see what came out,” reporter David Lamb wrote, “Southerners, exposed to capitalism for decades, were far more comfortable than their northern brethren in adapting to the demands of free markets.” Yet Hanoi eventually liberalized, too, and though it still lags behind Saigon (which the government renamed Ho Chi Minh City in 1975), it has made breathtaking economic progress.

Hanoi’s economy looks and feels entirely unregulated; the city bursts with activity. Though luxury boutiques, technology stores selling Apple products, high-fashion clothing outlets, and international food chains are easy to find, individual street-front proprietorships predominate. The state still owns or controls some of the largest companies, but the vast majority of businesses are too small to be centrally managed. On a single block, I saw the following for sale: Vietnamese flags, Ho Chi Minh T-shirts, candles, incense, bolts of cloth, used clothing from the U.S., fake money to burn in offerings to ancestors, Angry Birds toys, exotic fruit, meat skewers, iPhones, tea, jewelry, Italian shoes, French pastries, spices, herbs, motorcycle helmets, bootleg CDs, bootleg cigarettes, Japanese BBQ, carpets, funeral boxes, silk, paintings, and bootleg paperbacks with misspelled blurbs on the back.

The city is extremely business-friendly. I asked a local man who works for an American company how hard it is for foreigners to invest and go into business in Hanoi. “The Vietnamese government makes it easy,” he says. “Just present them with a business plan, tell them what you want to do, and you’re good to go.” The same goes for small businesses. All you have to do, he says, “is rent the space, pay the taxes, and that’s it.”

The United States didn’t normalize diplomatic relations with Vietnam until 1995, so American companies got into the game only recently, but their presence is evident now. It’s impossible to miss the Starbucks, KFC, Pizza Hut, and Burger King franchises. General Motors, Dell, Visa, General Electric, and countless others have invested here, too. The Vietnamese want more and will soon get it: Washington is poised to enact the Trans-Pacific Partnership (TPP) with 11 Pacific Rim nations, including Vietnam. The TPP will remove outdated bureaucratic trade obstacles on both sides while enforcing labor standards, environmental protections, and intellectual property rights.

Vietnam even boasts its own high-technology start-ups. “The incubation and funding of tech start-ups is still a fragmented segment of our economy,” says Nguyen Pham, founder of the start-up incubator 5desire, “but we’re working on streamlining the process and modeling it rigorously after those in Silicon Valley. We organize technology events that attract world-class foreign speakers and investors. One of our notable events was Hackathon Vietnam 2014, where we partnered with Formation 8—a well-known venture capitalist firm from Silicon Valley—and with the ministry of science and technology in Vietnam. More than a thousand people attended, more than 60 percent of them developers.”

I’ve been to 15 formerly Communist countries, plus Cuba, which is still Communist. (See “The Last Communist City,” Spring 2014.) Vietnam is the only one with good cuisine. I can’t recall enjoying a single quality meal in Europe’s former Communist bloc. Marxism bulldozed restaurants along with everything else, and chefs in post-Communist Europe haven’t had much time to master their craft. Cuba’s food is still mostly terrible, though a handful of restaurants are privately owned and offer tolerable fare. The biggest problem there is a chronic shortage of quality ingredients. Yet Vietnam—still nominally Communist—somehow has outstanding food everywhere, even on the street. It must be some combination of the ingredients, the cooks, and the cuisine itself.

Prosperity never guarantees an aesthetically pleasing urban environment, but Hanoi is easy on the eyes. The city center is dominated by the charming but chaotic old quarter and the more stately and orderly French quarter, just minutes away on foot. Both neighborhoods are anchored by Hoan Kiem Lake, the city’s cultural center. Its name means “returned sword,” after the weapon that the gods supposedly gave Emperor Le Loi in the fifteenth century, which he used to drive out the invading Chinese. Hanoi sparkles with lakes—Hoan Kiem is only the most famous—and it’s studded with an even larger number of ancient Buddhist pagodas with vertical Chinese characters on the walls.

The most exquisite buildings are French and Chinese, but the simpler Vietnamese homes can also be striking. Many look as though the architects mashed Victorian, French, brownstone, and Thai architecture together, and then squeezed the final product into a vise to make it taller and narrower. (Homes and businesses get taxed by their width.) Vietnam’s Communists were wrong about almost everything, but at least they elided some of the mistakes made by their comrades elsewhere in the war against anything old. Hanoi is blessedly free of an asteroid belt of Soviet-style garbage architecture on the outskirts, the kinds that blight so many formerly Communist cities in Europe. I did see a few soul-crushing structures made of poured concrete, but for the most part, these kinds of buildings were never built, or were torn down, or have been overwhelmed by an explosion of new and better construction. Hanoi has grown exponentially since its worst days—the city’s population, under 1 million in 1979, now exceeds 7 million, making it larger than every American metropolis but New York—so perhaps the ugly stuff has just been obscured.

The sky was white the day I arrived, during the hot season. The city was foggy, but the ambient air temperature was 99 degrees, with 108 percent humidity. After five minutes outside, I felt as though I’d been hosed down with hot water. Yet the locals zoomed by on motorbikes, many wearing jackets and gloves, seemingly oblivious to the sauna-like conditions.

“Not in my wildest dreams,” said an Australian man on holiday I bumped into, “could I have imagined what an absolute madhouse Hanoi is.” I was a little less shocked, having lived in Beirut, but he’s right. Hanoi is a madhouse, the diametric opposite of dead cities like Havana and Pyongyang. The city thunders with a never-ending cacophony of honking, zooming, blaring, shouting, pounding, and jackhammering, even late into the evening.

Above all, it thunders with motorbikes, careening through the streets with little or no regard for traffic signals, speed limits, or road courtesy. Crossing the street in the old quarter is a terrifying experience. No one will stop for you. They’ll go around, sure, but they’ll never stop to let you cross—ever. Your only option is to pick a direction, pick a speed, and step into traffic. Trust that they don’t want to hit you any more than you want to get hit. But you’re probably better off closing your eyes, holding your breath, and crossing blind than hesitating or trying to dodge them, which would just keep them from figuring out your vector.

The emergency rooms in the hospitals must be busy. I saw a young man ride his motorbike an entire city block while texting on his phone, dodging other traffic, using only his peripheral vision. Young women ride “sidesaddle” on the seat behind their boyfriends without holding on to anything. One sudden stop or turn, and they’ll fly at top speed into traffic. A woman rode past me with a 50-pound dog on the seat behind her, trying with all its might not to fall off as she zoomed around town. I even saw a family of five, including an infant, piled on to a scooter. None wore a helmet or other protective gear. Who knows how many laws would be broken if a family did that in the U.S.?

Sidewalks in the old quarter are obstacle courses of street hawkers, food stalls, elderly ladies selling fried dough and vegetables, and people squatting on tiny stools eating dinner. Sometimes so many parked bikes stand in the way that pedestrians have to wade out into the dangerous traffic to get around them. But in the French Quarter—which in some places looks like an immaculately restored, near-perfect copy of France—the sidewalks are clearer, the streets easier to cross. They’re wider, so motorbike riders have no choice but to respect the red lights. Not even the Vietnamese can blow through lights at huge intersections without getting smashed.

I hired a 60-year-old man to show me around and asked if he had a car. “The middle class doesn’t have cars yet,” he said, and added that he didn’t even know how to drive. At once, I felt ridiculous for asking. Of course he didn’t have a car. Motorbikes—mopeds and scooters—make up 99 percent of Vietnam’s traffic. It’s strange, in a way, since houses larger than mine in America take up a large percentage of the city’s space. Perhaps the middle class would rather spend its money on housing than transportation. Though not nearly as vertical, Hanoi is a bit like Manhattan: there’s no room on the streets for everyone to have a car. They wouldn’t be able to park, let alone move. Urban planners would have to pull down the city and start over to change that. The government knows it and punishes would-be drivers with an almost 200 percent car tax.

No matter how rich the Vietnamese become in the future, they can’t defeat physics. They will be stuck riding motorbikes of one kind or another for the foreseeable future. But it wasn’t long ago that most of them rode bicycles. Before that, they walked.

I have been to malls around the world. I generally find them antiseptic and dull and hardly ever visit them when I’m home. But Hanoi’s Royal City Mall shattered every idea I had ever held about Vietnam, and it still stunned me even after spending a week in the city. How strange that such a place exists in a country run by a government that calls itself the Communist Party! Ho Chi Minh would have mortared it out of existence.

LUONG THAI LINH/EPA/CORBIS

The entrance looks like a Roman emperor’s palace surrounded by luxurious high-rises. The inside is vast and burrows deep underground. You can walk around for miles without retracing your steps—past sparkling fountains, gourmet restaurants, and local boutiques as well as international chain stores, snack shops, playgrounds, an ice-skating rink, and a huge area that resembles a cartoonish version of Hanoi’s old quarter but without the hazardous traffic, the noise, the banging construction, the obstacles on the sidewalks, and, blessedly, the heat and humidity. The place is as opulent as Las Vegas. In fact, the indoor replica of the old quarter is exactly what a Las Vegas mogul would build if he decided to create a Vietnam-themed hotel and casino resembling the Disneyish knockoffs of Venice, New York, and Paris. I couldn’t help but laugh. The Vegas version of Hanoi exists . . . in Hanoi.

I could only imagine how a Cuban would feel if he found himself whisked here from Havana with a ration card in his pocket and his state-imposed maximum wage of 20 dollars a month in his wallet. The only “mall” I saw anywhere in Cuba was a dismal space, located inside a concrete box that looked like a parking garage and offering only the most meager selection of wares. I’ve been to better malls in Iraq.

Royal City is just one huge mall among many in Hanoi, all visited by thousands of middle-class people daily. The malls seem to offer proof that, around the world, across diverse cultures, people yearn to be bourgeois. When they have the means, they like to visit climate-controlled shopping centers. They buy things. They have dinner. They see movies in the cinemaplex. They take the kids. They hang out with friends. Some might charge that the Vietnamese have caught the disease of Western consumerism and are losing their souls to it, like Americans. But if you want to stop people from living this way, you’ll need to put them in camps.

Despite having terrible relations with China, Hanoi is explicitly following Beijing’s economic and political model. The trade-off is simple: the state will yield on economic freedom as long as citizens don’t demand political freedom. Princeton professor and China expert Perry Link describes the bargain as, “shut up and I’ll let you get rich.” So far, it’s working in both countries. Perhaps none of this should be surprising. “Vietnam was never all that ideologically Communist,” former U.S. ambassador to Vietnam Pete Peterson says. “It was always more socialist and nationalist. I told them they should stop calling themselves the Communist Party, but I didn’t get anywhere with it. Everybody pays for everything over there, including health care. The government hardly provides anything. Sweden is more socialist than Vietnam.”

I asked one Hanoi resident what the word “Communism” means today in Vietnam. “Communism today just means we’re run by one political party,” he said. “Some people complain about that, but it doesn’t matter to me as long as the government creates a good business and living environment, and it does. I don’t want different political parties competing with each other and creating a crisis like in Thailand.” He may not mind one-party rule, but plenty of Vietnamese do. The government has created the conditions for the kind of middle-class revolt that erupted in Taiwan and South Korea before those countries matured into multiparty democracies.

Vietnam is enjoying a holiday from history, basking in the prosperous and relatively “free” post-totalitarian phase of its evolution. Amid all the economic and cultural dynamism, the state is a weirdly distant anachronism, its billboards and slogans as out of place as World War II posters would be in America now. Over a ubiquitous public-address system, the party still blares “news” into the streets and into everyone’s home each morning and evening, but the Vietnamese I talked with dismissed it as “just propaganda.” Not just the ideology but the state itself feels almost irrelevant to anyone who isn’t an outspoken dissident. Controlling Vietnam’s people and imposing order on its freewheeling chaos is an exercise in futility. No-honking signs and traffic regulations are routinely flouted, as are parking restrictions. I saw two police officers pull up in a car across the street from my hotel and yell at people through a bullhorn to move their motorbikes off the sidewalk. They complied, but less than five minutes after the policemen drove off, the space filled up again.

The most striking example that I encountered of the state’s remoteness from reality was inside an electronics store, where a vast selection of cutting-edge technology compared with that of the best outlets in Silicon Valley. The store sold the usual selection of smartphones and tablets, of course, but also “smart” rice cookers with options Americans have never even heard of. I saw an 82-inch Ultra HD TV with clarity so sharp it stopped me dead in my tracks. It cost $15,000.

Just down the same aisle, a small TV was tuned to an official government “news” channel. It showed elderly men in army uniforms lecturing a roomful of grandmothers old enough to remember the war and the great socialist revolution sitting in metal chairs with their hands folded in their laps, listening like well-behaved schoolchildren. The program’s production values were no better than home movies made on a camcorder in 1986, which made the TV itself seem decades out of date, though it had just come off an assembly line in Japan. I stared at it, fascinated by its dismal 1970s feel in a roomful of eye-popping technology. None of the Vietnamese shoppers paid the slightest bit of attention. They seemed to recognize, as I did, that the regime is an undead relic from another era, made obsolete by the nation’s growing prosperity.

Vietnamese anti-Americanism scarcely exists. What we call the Vietnam War, and what they call the American War, casts no shadow—especially not in the South, which fought on the American side, but not even in Hanoi, a city heavily bombed by the United States. I saw no evidence that the U.S. (or anyone else) ever bombed Hanoi. All the damage has apparently been repaired, and most Vietnamese are under the age of 30—too young to remember it, anyway.

The war was just one in a long history of conflicts, and it isn’t even the most recent. After the U.S. withdrawal, the Vietnamese continued fighting themselves. “Open your eyes and turn over the enemy corpses,” wrote poet Trinh Cong Son. “There are Vietnamese faces upon them.” Vietnam invaded Cambodia in 1978 and dished out a long-overdue regime change to Pol Pot and his legions of génocidaires. China invaded Vietnam in 1979. Before its twentieth-century conflicts, the Vietnamese fought the Chinese on and off for more than 1,000 years. The war we Americans know so well and mourn is a mere blip in Vietnamese history, one that everyone in both countries knows will not be repeated.

Perhaps it’s not so remarkable that the Vietnamese have moved on. Most Americans don’t hold grudges for long, either, after the furies of war have subsided. Hardly any of us hate the Japanese, the Germans, or the Vietnamese. We rightly despise the Taliban and Isis, but not the innocent people of Afghanistan or Iraq. So the Vietnamese aren’t unique for being emotionally mature about history—but they do contrast with some, especially in the Middle East, who can’t get past even the most ancient of grievances. George Santayana famously said that those who can’t remember the past are condemned to repeat it, to which P. J. O’Rourke added, with the Arab-Israeli conflict in mind, that “it goes double for those who can’t remember anything else.”

Today, both the Vietnamese people and government—in the north as well as the south—view Americans as allies. The leaders are Communists who voluntarily embarked on a journey of economic dynamism and friendship with the United States, first abandoning and then reversing everything they once fought and died for. They’re prospering as a result. May the same one day happen in Havana and Pyongyang.