You'd think that Bart Simpson had just landed in Rio and punched the Girl from Ipanema in the face.

The Simpsons, the politically incorrect cartoon family, have become personae non gratae in Latin America's largest nation. Brazil's presidential spokesman has personally denounced them as troublemakers. Rio authorities have threatened lawsuits and boycotts. Cariocas, as the residents of this city are called, are so furious they seem poised to brush the sand off their thongs and take up arms against Bart, Homer and the gang.

At issue is a March 31 episode of the Fox TV show in which the Simpsons visit this sultry metropolis and encounter an orgy of Brazilian stereotypes. Homer gets kidnapped by a taxi driver while Lisa goes searching for a poor child she sponsored at "the Orphanage of the Filthy Angels." Family members get mauled by monkeys on Copacabana Beach. Bart gets hooked on a racy children's show called "Teleboobies." The Simpsons also learn a new Brazilian dance, a successor to the steamy lambada -- the penetrada.

The episode did not even air in Brazil, but outraged Brazilians living abroad saw it, local newspapers and television networks did stories about it, and an immediate media frenzy was born. The cartoon was immediately treated as a national insult of the highest order, sparking a burst of anti-Americanism that suddenly made Brazil feel more like Baghdad. Or, at the very least, like France.

"These confusions you make with our culture, our habits and our tastes are outrageous," Roberto Pereira, an official at the city's Center of Sexual Education, said in an e-mail he fired off to the foreign press association in Rio. "Americans think we are inferior, ignorant, perverted, dirty animals!"

The anger took Fox by surprise. Spokesmen say none of the other overseas satires on "The Simpsons" -- which have featured France and Australia -- resulted in anything close to the uproar here. For Brazilians, however, the March 31 episode was the latest example of what many consider annoying U.S. cluelessness about their country.

They may have a point. Brazil is bigger than the continental United States and has an economy larger than Russia's, yet even those Americans who can find it on the map occasionally mistake Rio, or even Buenos Aires (which happens to be in Argentina), as the capital. The show did acknowledge that Portuguese, not Spanish, is the language of Brazil's 170 million residents. But most of the characters the Simpsons encountered had suspiciously Spanish-sounding accents.

"This is not a civilized way to be treated," said Laura Cavalcanti, a Rio anthropologist. "We are a major country."

Yet the most self-critical Cariocas admit that the strong reaction came, in part, because the show hit awfully close to home. Crime, unabashed sexuality and severe poverty are indeed part of the fabric of life in Rio, and actually in most of Brazil. This nation has never been quite sure of its place in the world, and still smarts from a decades-old quip, attributed to Charles de Gaulle, that Brazil is the county of the future, and always will be.

The well-to-do here often complain that the foreign media focus excessively on Brazil's shockingly large ghettos and disparities of wealth while ignoring its First World attributes such as a burgeoning fashion industry and cutting-edge aviation technology. Foreign criticism or misstatements of fact about Brazil are often dramatically exaggerated by the local press.

No place is more sensitive than Rio, which winces at its reputation, even domestically, as Brazil's beach bum. Yet this stunningly beautiful metropolis of nearly 11 million spent decades cultivating an image as a city of skin and sin, especially during Carnaval season when clothing becomes optional here.

Now, after the "Simpsons" episode, Rio is suddenly acting like a blushing bride. Despite its easygoing image, Rio is a place misleadingly uneasy with itself.

The monkeys marauding around Copacabana in the sitcom, for instance, struck many Cariocas as a low-blow reference to their status in the developing world. Some officials even took it as a racial slur against the city's Afro-Brazilian population. Yet Rio is indeed home to the globe's largest urban green space, with more than 80,000 acres of lush jungle whose creatures cohabit with cosmopolitan life. Spotting wild monkeys here is not exactly rare.

"I see monkeys in the trees in front of my office all the time, and there are monkeys in Copacabana, too," said Paula Gobbi, an Argentine journalist who has lived in Rio for 16 years. "I think it's fantastic, something to be proud of. But you listen to some of the authorities here who are now trying to pretend the monkeys don't exist and you just have to wonder what is going on in their heads."

And while some people found Bart Simpson's fondness for "Teleboobies" offensive, this is, after all, a nation where Xuxa, a soft-porn queen and former girlfriend of soccer great Pele, leapt to stardom as host of her eponymous kiddie show. She appears on the show in impossibly short skirts and skintight tops, and various of her male co-hosts have posed nude for Brazil's gay magazines. Another program for Brazilian youngsters was hosted by Tiazinha, a leather-clad dominatrix with a whip.

Average Cariocas themselves are hardly the height of modesty. Here, in the city that invented the "dental floss" bikini, there seems to be a competition over who can expose the most "bumbum" in public. Men, even strolling through business districts on the way to the beach, often sport tiny sungas, a sort of super-low-cut Speedo. What is risque abroad is simply normal here.

After a week, things have cooled a bit. Jose Eduardo Guinle, Rio's secretary of tourism, had threatened to sue Fox for damages. Now he is simply calling on the show's producers to donate proceeds from the episode to the poor of Rio, "whom the show's producers seem to be so concerned about."

He was also demanding an apology. And got one, of sorts.

"We apologize to the lovely city and people of Rio de Janeiro," said the show's producers in a statement. "And if that doesn't settle the issue, Homer Simpson offers to take on the president of Brazil on Fox's 'Celebrity Boxing.' "

Homer Simpson and family visited Rio in a recent episode. The city hasn't been the same since.Grist for the "Simpsons" mill: When not making a spectacle of herself, Tiazinha hosted a TV show for kids.