The oil and gas industry received a long-awaited gift from Congress when lawmakers approved a drilling pact between Mexico and the United States as part of the budget deal, signaling enhanced cooperation between the two nations just after Mexico opened energy exploration to foreign companies.

The Transboundary Hydrocarbons Agreement opens drilling access to a fairly small amount of oil and gas — the Interior Department's Bureau of Ocean Energy Management estimates the 1.5 million acres of the Gulf of Mexico covered in the deal contains up to 172 million barrels of oil and 304 billion cubic feet of natural gas. By comparison, state-owned Mexican oil firm Pemex believes its share of the entire Gulf contains up to 29 billion barrels of oil.

More than the amounts of gas and oil that can be recovered, though, the agreement underscores what could become a profitable relationship for U.S. oil and gas companies. It comes just after Mexico passed a law opening drilling to foreign firms for the first time since 1938, which experts believe could result in a gusher of investment -- and handsome returns for the oil and gas industry.

“The energy production made possible by this agreement will put Americans to work and raise more revenue for the government,” said Erik Milito, upstream director with the American Petroleum Institute. “American companies will now have the certainty they need to invest confidently along our maritime border with Mexico.”

The pact establishes a framework for deepwater drilling along the Gulf's U.S.-Mexico maritime border. Both nations have resisted drilling in the area since the 1970s, citing difficulties dividing resources from drilling, especially as it pertained to two "donut holes" that lay outside each both nations' exclusive economic zones.

The agreement calls for a plan to divide those resources, though the sides have yet to agree on the specifics. It's a tricky task, given that drilling on the U.S. side of the border could drain oil from the Mexican side. Recognizing that, the deal also creates a process for resolving disputes, as well as environmental and safety regulations.

It didn't come easy. Agreed to in February 2012, Congress had until the end of 2013 to approve the pact. Otherwise, Mexico could have begun drilling on its side of the border without a deal.

A breakthrough came in the fall when the American Petroleum Institute stopped pushing for an exemption for disclosing payments made to foreign governments, a new policy that is part of the Dodd-Frank financial reform law.

The disclosures, fiercely supported by human rights groups, are intended to reverse the so-called "resource curse" in which governments of resource-rich countries are plagued by bribery and corruption, in turn stunting development.

API had argued the disclosures would put U.S. companies at a disadvantage because foreign competitors don't abide by the same rules. House Republicans put forth a bill exempting oil and gas companies.

But with the clock ticking, API decided to pull back, saying a deal requiring disclosure was better than none at all, clearing the way for approval.

In the end, the deal proved a victory for the oil and gas industry as well as for human rights groups, which is about as rare as Congress passing a budget.

"Congress, then, has rejected disclosure exemptions and reaffirmed the importance of public disclosure of company-by-company payment information for investors and citizens around the world," anti-poverty group Oxfam said of the deal.

The White House praised lawmakers for green lighting the agreement just days before the deadline.

"The administration appreciated the opportunity to work with key bipartisan congressional leaders to move this important priority forward," said Caitlin Hayden, a spokeswoman with the National Security Council.