How the mighty have fallen in Mexico -- at least on movie screens and in social media.

A comedy lampooning the rich has become the highest-grossing film in Mexican cinema history, with five million moviegoers laughing at the story of a construction tycoon fooling his spoilt children into a life of poverty.

"Nosotros Los Nobles" ("We Are The Nobles") has hit a nerve -- or the funny bone -- in a country with one of the widest income gaps in the world, where 10 percent of the people control 40 percent of the wealth while almost half live in poverty.

Then last month, in a real-life scene that could have come right from the script, inspectors from the Profeco consumer protection agency tried to close a restaurant after their boss's daughter complained she was denied her table of choice.

But the tables turned on her when Mexicans denounced her behavior on Twitter, dubbing her #LadyProfeco. Some mocked her as a daddy's girl, asking her to shut down a volcano spewing ash, but many saw it as the latest example of the elite's sense of entitlement.

Gary "Gaz" Alazraki, the 35-year-old director of "Nosotros Los Nobles," said the young woman's behavior is typical of the privileged few in Mexico, who often think they are above the law, and he wanted to use comedy to depict the disconnect between the elite and the poor.

"This film was a caricature, done with lots of love, of how Mexico is today, emphasizing the good and the bad, but with a hopeful tone saying that this is only a bad period," Alazraki told AFP.

"Mexico today is similar to the United States in the 1930s: Divided social classes, a sharp wealth gap, not only between how much one or the other has, but also between the color of one's skin," the blue-eyed filmmaker said.

Alazraki readily admits it: He comes from the same world as the Nobles. His father, Carlos Alazraki, is a well-known advertising guru who worked on several presidential campaigns.

When he turned 18, he got mad at his father for reneging on a promise to buy him a car. But he felt bad when he saw his university friends commute by bus.

"I felt a little guilty about having thrown such a fit. But it showed how disconnected I was from the realities of the country," the filmmaker said.

In the movie, businessman German Noble -- tired of seeing his three children cruise through life thanks to his deep pockets -- decides to teach them a lesson by faking his bankruptcy and staging a police raid on his property to force them to get jobs.

The oldest son, Javi, likes to party and fly on a private jet to Miami -- until he ends up driving a bus in Mexico City's congested streets.

The daughter, Barbie, talks down to the help and leaves bad tips, but she suddenly finds herself serving tacos in a cantina. When she learns she has to share tips with co-workers, she asks: "Are we in Cuba now or something?"

The youngest, Charlie, gets kicked out of university for sleeping with a professor and takes up a job as a bank teller.

Mexican cinema has produced successful dramas in recent years, like "The Crime of Father Amaro," which was Mexico's box-office champ for 11 years until "Los Nobles" dislodged it last month.

But Alazraki said he decided to make a "Hollywood movie in Spanish." The movie -- made with a relatively modest budget of $2.4 million -- has raked in more than $20 million over six weeks, finishing in the second spot last weekend behind Hollywood blockbuster "Iron Man 3."

Film critics say Alazraki's comedy resonated among moviegoers because it is an easy laugh, returning to an old formula from 1940s Mexican cinema showing the tribulations of the poor and the rich.

"The poor are happy, they have a big heart and they live in the real world, while the rich are the people who must beg for affection," Jorge Ayala Blanco, an author of 11 books on Mexican cinema, told AFP.

Leonardo Garcia Tsao, a film critic for La Jornada newspaper, said the middle-class goes to the movies in Mexico, and "in this case, the film mocks the rich, which they're not, and the poor, which they're not either."

The audience laughed throughout the film at a movie theater in the posh district of Polanco, two blocks from a dealership that sells Ferraris while children beg for money across the street.

"It's one of the few funny Mexican movies," said Beatriz Arrechiga, a 35-year-old radio ad consultant. "It shows the classism in this country. There is a message for a class of young people who depend on their dads."

Lady Profeco and her father Humberto Benitez, meanwhile, have apologized and the Maximo Bistrot voluntarily closed temporarily. While Benitez avoided the ax, lawmakers want him to testify and four of his subordinates were suspended after a probe ordered by President Enrique Pena Nieto.