I was sitting at a restaurant when the Canadian woman across the table from me said something that caught me off-guard.

"I love this city."

At first I thought she was getting carried away by the ambience. We were dining at Sides, a chic establishment whose modern minimalist interior was highlighted with African art, and we had eaten shark carpaccio, hearty bowls of fettuccine with mushrooms and a sinful sticky-toffee pudding with a warm crust. It was all very wonderful indeed, but wasn't she taking things a bit far? This city was, after all, Johannesburg.

She went even further.

"This city is so exciting, so exuberant, so beautiful," she said, "I could move here." She was on her second visit in six months, her first having been to attend the 2002 Earth Summit. The weeklong event, as it happened, had been a watershed for Johannesburg, not only because of its magnitude and slick execution but also because it introduced more than 70,000 foreigners to a city they may never have visited otherwise. And many of them, like the Canadian woman, were enchanted.

"The only thing I couldn't understand," she said, echoing a sentiment I heard repeated often, "was why I hadn't thought of coming here before."

There may not be another city in the world so large — close to 4 million in the 2001 census — so vibrant and so culturally rich that is so far off travelers' radar screens. Johannesburg has top-class restaurants and galleries; a theater world where at the same time last year you could see Michael Flatley's "Lord of the Dance," an African version of "Julius Caesar" and the ballet "Coppelia." It also has excellent shopping, trout-fishing within half an hour's drive of downtown and a 2-billion-year-old fossil site that has provided paleontologists with 40% of the evidence that points to human evolution.

A scar on the city's image

Yet most visitors to South Africa barely stop over for longer than it takes to change planes for some other destination, usually Cape Town or a safari. If Johannesburg weren't the country's major hub, visitors would probably skip it altogether.

Why? Crime.

I'm tempted at this point to identify several other popular international destinations that also have high crime rates, but I won't. Those places are more famous for something else — and that usually includes a waterfront. Johannesburg is one of the world's few major cities not built on water. It is 30 miles from the nearest large river, the Vaal, and 300 from the Indian Ocean, and although its most acclaimed asset, gold, lies unseen, its extraction has left behind numerous unattractive mine dumps.

When a wave of homicides and carjackings hit the city in the mid-1990s, its image got worse.

In the last few years, though, crime has been falling, zero tolerance has become a catch phrase and city officials liken Johannesburg's cleanup to New York's in the '80s and '90s. The U.S. State Department nevertheless warns that South Africa, and Johannesburg in particular, has "significant street crime such as muggings, pickpocketing and random street violence."

Pretoria is the capital, but Johannesburg is the commercial hub of the country, often regarded as New York to Cape Town's San Francisco. It displays the nation's best and worst, the plushest mansions created by its wealth and the poorest shanties created by a legacy of political and economic inequality. It has become a magnet for immigrants looking for new opportunities, and the mix of good and bad, local and international, has led to an apt saying: If you haven't seen Johannesburg, you haven't seen South Africa.

Each time I visited the city annually after 2000, I noticed refreshing changes. People were still taking precautions, locking their car doors wherever they drove, avoiding parts of town like Hillbrow and the City Center, and keeping their valuables close at hand. But there were more profound shifts, that, as a onetime Joburger, I kept noticing.

Entire suburbs where residents had emigrated to Australia were being gussied up by their new owners. People were walking their dogs again. Cafés were moving their tables onto the sidewalks. And most everyone was upbeat — a combination of the better security, the clement weather (Johannesburg, situated on a high plateau, has plenty) and a booming economy.

A good place to see this vibrant energy is Melrose Arch, a new precinct of shops, restaurants, offices and lofts not far from downtown. I was walking around Melrose Arch one night — jazz music spilling out of the Kilimanjaro nightclub, restaurant tables overflowing onto the central piazza and people sipping coffee at outdoor cafés — when I momentarily forgot where I was. The high-tech architecture, tiled murals and rows of palm trees reminded me of a city in southern Europe or North America.

Many people, in fact, confuse Johannesburg with Los Angeles. If it's not the culture of driving everywhere, it's the glut of convertibles, the ribbons of highways, the gated suburban neighborhoods, the spectacular houses, the glitzy malls of Sandton and Rosebank, and the beautiful people forever talking on cellphones. One of its nicknames, City of Gold, calls to mind the City of Angels.

But Johannesburg has other, more popular names, among them Joburg, Jozi and the Sotho translation for City of Gold, Egoli. Whenever you think you're in a glossy city, Egoli pops up to bring you back to Africa. In the shadow of the 50-story Carlton Center, for instance, the taxi-jammed square is named after Mahatma Gandhi, who, while working here as a lawyer in the early 1900s, formulated his philosophy of passive resistance, satyagraha.