The Simpsons has a history of making light of everyone and everything it can -- sometimes to the detriment of the show. Potential guest stars have been offended by their proposed appearances. Other elements of the show have grown more problematic as jokes and setups haven't aged well.

But while The Simpsons has plenty of fun at pretty much every group of people on the planet, a Season 13 episode offended the nation of Brazil so much that the titular funny family almost found themselves at the center of an international legal incident. "Blame It on Lisa" still stands as one of the Fox series' most controversial installments. That's because it featured a considerably unflattering portrayal when Lisa brought the Simpsons to Rio de Janeiro.

RELATED: One Of The Simpsons' Earliest Episodes Almost Killed The Series

The Simpsons Brazil Conflict Season 13 2

After discovering that Lisa had been sponsoring a young orphan in Brazil who'd mysteriously gone missing, the Simpsons decided to travel to Brazil to try and find out what happened. Their trip became further complicated when Homer was kidnapped and the family had to find a way to pay the ransom. Although it was critically acclaimed in some circles for its humor (and was even nominated for a Writers Guild of America Award it lost to Futurama's outstanding episode "Godfellas"), it also was criticized for basing many of its jokes in stereotypes about the South American nation.

The response to the episode was far more one-sided in Brazil -- which took the episode as a genuine insult. Brazilian media criticized the episode, highlighting that many of the jokes didn't even have enough cultural awareness to be specific to Brazil, instead just being basic gags about the continent as a whole. The episode also aired at a time when Brazil was trying to increase tourism; the country's portrayal in The Simpsons as a rat-infested and crime-ridden slum seriously angered the Brazilian tourist board Riotur. They'd spent millions of dollars on their campaign -- and with a single episode, the series upended their plans. This resulted in the company announcing plans to seek legal repercussions for the perceived damages.

A week after "Blame It on Lisa" premiered, Riotur revealed they intended to sue Fox -- with then-Brazilian President Fernando Henrique Cardoso supporting the lawsuit and claiming (according to reporting from BBC News at the time) that the episode "brought a distorted vision of Brazilian reality" to the world. Although it's unlikely the lawsuit would have done much to The Simpsons considering the parody laws that apply in America, it was a fight the producers didn't want. The situation eventually reached the point where executive producer James L. Brooks (who almost changed the plot of The Simpsons Movie) issued a public statement apologizing for the show's portrayal of Rio.

RELATED: In Defense Of The Simpsons Episode That Matt Groening Disowned

The Simpsons Brazil Conflict Season 13 3

"Blame It On Lisa" honestly does feel regressive at times, imagining a Brazil that is colorful but horrifying. The stereotypical jokes lack the specific flavor or punch that elevated similar episodes like Season 7's "Bart vs. Australia" and Season 10's "30 Minutes Over Tokyo." The latter was also accused of using racial humor, but most of its jokes were specifically rooted in Japanese culture as opposed to "Blame It On Lisa's" broader comedy.

But it's also clear the show learned its lesson, given that the Simpson family eventually returned to Brazil, albeit more than a decade later, in Season 25's "You Don't Have to Live Like a Referee." After being recruited by former EA Sports darling FIFA to serve as a referee in the World Cup, Homer brings the rest of the family with him to Brazil. That portrayal of the nation is still littered with gags, but many of them jab at the world of football -- and the episode highlighted Rio de Janeiro's beauty on top of mocking it, finding a balance that The Simpsons didn't have in Season 13.