Talk about a lucky windfall! The latest James Bond film Spectre reportedly received $20 million from the Mexican government in exchange for some script changes.

An e-mail leak obtained by TaxAnalysts.com revealed that the producers of the film pushed the writers to make some creative changes in order to receive the $20 million. The e-mail correspondence was made by MGM's motion picture group president John Glickman, who revealed details about the "incentives" from the Mexican government.

Writers Neal Purvis and Robert Wade then worked double time to improve the screenplay made by Oscar-winning John Logan to accommodate the specific requirements made by the Mexican government. In fact, the requests they made even governed the content of the film, according to Cinema Blend.

The demands include the movie featuring highlights of the skyline and other "modern" features of Mexico City in hopes of boosting its tourism through the James Bond film.

They also required that a popular Mexican actress be cast as Estrella, a woman whose hotel room Bond uses to start his hunt for Sciarra. James Bond: Spectre eventually decided on Stephanie Sigman for the role of Estrella.

They were very specific that the main villain, Sciarra, should not be Mexican, so James Bond: Spectre accommodated this by casting Italian actress Monica Bellucci as the villain.

The Mexican government also requested that the governor of the Federal District whom Sciarra is targeting had to be replaced with an international leader, while the Mexican police had to be replaced by a "special police force."

Lastly, Bond's pursuit of Sciarra had to be during the Mexican "Day of the Dead" celebration instead of a cage match.

According to Cinema Blend, the last requirement was made so that all the other requirements would make sense. All the changes made created a four-minute sequence, which they expected to bring in $14 million. However, by showcasing more of Mexico City's scenes during the film, they managed to get an additional $6 million.

James Bond: Spectre already has a huge budget of $300 million, but the MGM president said that they needed $50 million more to factor in the extended shooting period. It is uncertain why Spectre required such an enormous budget, since it is already double for what it cost to make the previous James Bond movie Skyfall, which was around $150 to $200 million. 

James Bond: Spectre will be hitting theatres on November 6, 2015.