While the United States’ oil and gas industry has lately been going absolutely gangbusters, Mexico’s oil production has been declining over the past decade — and it isn’t very difficult to figure out why. The state-owned oil company Petroleos Mexicanos, a.k.a. Pemex, was founded in the 1930s and has precluded foreign as well as private investment into the development of Mexico’s considerable oil and gas reserves throughout most of its history. The prevailing populist/socialist-ish sentiment that tends to look on said foreign and private investment as little better than plunderage of The People’s natural resources has kept the industry from following in the United States’ footsteps, but as President Peña Nieto put it when signing the legislation removing these self-imposed economic shackles last December, “we’ve decided to overcome the myths and taboos to take a great leap into the future” — and that time is almost nigh. Via the Washington Post:

Pemex has always functioned as an arm of the state. It’s the biggest Mexican company and the country’s biggest taxpayer. In the final quarter of 2013, Pemex paid 50 percent of its revenue — $16 billion — in taxes to the federal government, which uses the state-owned company to fund a third of its budget. Pemex posted a loss of $5.8 billion for the quarter, bringing its total loss for 2013 to $13 billion. It lost $2.74 billion in the first quarter of 2014. …

Edgar Rangel of Mexico’s National Hydrocarbons Commission, which oversees and regulates oil exploration, predicts that the opening of the country’s energy industry will bring in up to $30 billion of foreign investment annually and create as many as 2 million jobs.

The law’s approval prompted Moody’s Investors Service in February to raise Mexico’s credit rating one level to A3 from Baa1, saying it will help add about one percentage point to the country’s annual gross domestic product growth by 2018. …

For foreign oil giants such as Chevron, Exxon Mobil and Royal Dutch Shell, it means gaining access to untapped oil reserves that Pemex says could total 113 billion barrels, including 26.6 billion in the deep waters of the Gulf of Mexico. The reserves are worth $11 trillion.

And the Energy Information Administration estimates that Mexico has at least the sixth-largest shale gas reserves in the world, which — with a little innovative technological/financial help — could help fuel a shale boom of their own.

Mexico’s Congress still needs to pass the secondary legislation that will officially open up the country’s industry, and Pemex and its powerful union are still acting a little cagey on just how much freedom they want these new investors and companies to have, but once everything gets sorted out, the industry should be ready for business sometime later this year — and this is exactly the kind of introduction to more economic and business freedom that Mexico sorely needs.