Executives at Sony Pictures Entertainment discussed getting as much as $20 million in incentives from Mexico's government if they changed characters and storyline details related to Mexico in the latest James Bond film, leaked emails show.

The changes, reported by tax news website TaxAnalysts.com, included replacing a scene set originally at a cage-match with a lavish Day of the Dead parade, and altering a scene in which the mayor of Mexico City is killed.

Film executives also responded to requests described in emails to make sure that the villain in "Spectre" not be Mexican, and that the new "Bond Girl" be Mexican.

Well into filming, the official '007' site revealed on March 9 that the franchise's first ever Mexican Bond Girl will be actress Stephanie Sigman, known for her starring role in the film "Miss Bala."

The TaxAnalysts.com report was based on leaked emails thought to come from the massive cyber-attack suffered by Sony last December.

The implications are that top-tier studios Metro-Goldwyn-Mayer, long-time lead producer for the franchise, and Sony Pictures Entertainment, which is co-financing and handling the film's marketing and distribution, altered the production and script to please Mexican backers for millions in cash and savings in exchange for portraying the country positively.

The news came at a time when Mexico's government keeps sinking into a significant international image problem. Top-level Mexican government officials, including President Enrique Peña Nieto, have been caught in corruption allegations over real estate deals with government contractors, among other recent scandals.

In the emails, film executives enthusiastically support changing the film as they faced a ballooning production budget.

"We should insist they add whatever travelogue footage we need in Mexico to get the extra money," wrote Amy Pascal, former co-chair of Sony Pictures, to Jonathan Glickman, president of MGM's motion picture group.

The leaked emails show studio execs discussing $14 million in incentives from Mexican backers, and making other adjustments to reach for $6 million more.

At the time, they saw the movie's gross budget topping into the $300 million range, which would make it the most expensive James Bond film ever made. Executives discussed goals to lower the film's budget to $250 million.

"You have done a great job in getting us the Mexican incentive," Glickman wrote in another message. "By all accounts we can still get the extra $6M by continuing to showcase the modern aspects of the city. [...] Let's continue to pursue whatever avenues we have available to maximize this incentive."

Filming for the Mexico sequence in "Spectre" took hold of much of the Historic Center of Mexico City since last Thursday, and is scheduled to continue through April 1.

Claudia Ruiz Massieu, Mexico's cabinet-level tourism secretary, admitted that her ministry offered a "minor" financial backing to the film, calling the Sony production a potentially useful tourism booster for Mexico's capital of 20 million people.

Ruiz Massieu did not offer a figure but said the agency had no part in adjusting the film's script.

Movie extras dressed in costumes of the Day of the Dead wait for a bus after a day's filming in downtown Mexico City. (Photo by Marco Ugarte/AP)

During filming over the weekend, a vintage-looking helicopter maneuvered over the central Zocalo square of Mexico City, which was adorned as a set for the "Day of the Dead" festivities that actually happen in November, and mostly in small rural communities and cemeteries.

Originally, reports said, that sequence would have been filmed at a cage-fight.

The fictitious parade in the heart of Mexico's capital featured extras in over-the-top costumes and kitschy masks. In recent years, purists of Mexico's Day of the Dead traditions have complained the holiday is over-marketed and exploited by big brands in the United States.

And as it turns out, Italian veteran Monica Bellucci will play Lucia Sciarra, the new film's villain.

Other changes Mexican officials and businessmen reportedly asked for were the inclusion of high-flying cityscape shots and "modern" features of the city.

Authorities also requested that scenes showing the Mexico City police in action should be replaced with some sort of "special police force." The city's police department has come under fire for violently breaking up protests and arresting people at random during demonstrations.

Mexico City Mayor Miguel Angel Mancera — whose character in the film has been swapped for an ambassador — told reporters the city was offering security and managing traffic, but not cash. Mancera said some 2,500 people were employed as extras for the shoot downtown.

Officials at both Sony and inside Mexico's government have not explained the source of the money mentioned in the leaked messages.

Speaking to reporters in Mexico City, "Spectre" producer Michael G. Wilson also denied that changes were made to the Bond script at the behest of Mexican officials. The producer noted Bellucci's casting was always the choice. But he also admitted that private Mexican money has also helped cut the film's costs.

"There was a group of hotels and others involved, who gave us financial support," Wilson said. He did not elaborate.

Tax incentives to attract films are a ubiquitous reality around the world with many governments reimbursing 20-30 percent of the money spent by the production in a country.

Some, like Puerto Rico, which has served as a stand-in for Mexico on multiple occasions, actually pay back up to 40 percent, putting faith in the ultimate benefit of professionalizing the local industry and boosting their economies.

Mexico, by comparison, has a relatively small incentive program for so-called "high impact" international productions.

Mexico's National Film Institute (Imcine) offers only one tax incentive for fully foreign productions, the Proaudiovisual Fund (ProAv), which offers a rebate of up to 17.5 percent of the total spent in Mexico for projects exceeding more than 40 million pesos, or $2.6 million.

But according to local media outlets, spokespersons for Imcine and officials in charge of the ProAv fund both denied involvement with the production.

That means officials at both Sony and inside Mexico's government have not fully explained the source of the $20 million mentioned in the leaked messages. Mexican film officials and Sony Pictures did not reply to requests for comment from VICE News.