A worker at a Petróleos Mexicanos refinery in Tula de Allende, Hidalgo, Mexico.Credit
Janet Jarman for The New York Times

MEXICO CITY — The international oil industry on Monday agreed to pay billions of dollars to the Mexican government for rights to drill in the country’s portions of the Gulf of Mexico.

The companies made a big bet that oil and natural gas prices would eventually rebound enough to make additional exploration and drilling profitable. The sale was validation of Mexico’s decision to open its former government-monopoly energy business to foreign investment and expertise.

“This is a vote of confidence that the energy reform is moving forward and for the geological potential of the Mexican Gulf deep waters,” said Jorge R. Piñon, former president of Amoco Oil Latin America and now an analyst at the University of Texas at Austin.

“Everybody paid a premium and that premium indicates the potential of the blocks,” Mr. Piñon said.

The government awarded eight separate blocks of offshore territory to companies including Total of France and Exxon Mobil and Chevron of the United States, which all already have a strong presence in the Gulf of Mexico and can therefore take advantage of existing service crews and pipelines they use in Gulf waters.

The most significant new entry may be by the China National Offshore Oil Corporation, or Cnooc, which won two blocks in the auction. Cnooc also has a strong presence in Latin America, and could now become a big player in Mexico as well.

Perhaps more than anything else, the bidding shows that the industry has confidence it will emerge from its current malaise of low prices, layoffs and cuts in capital spending. The companies are betting that if prices recover, they can profitably produce oil from high-cost, deepwater projects.

As further testing and development proceeds, the deepwater Mexican fields will probably not produce a significant amount of oil for at least a decade. But by that time, many energy analysts say oil prices might be $80 a barrel or more, compared with the current price of just over $50 a barrel.

The Mexican government had offered 10 exploratory blocks in total, estimating that they contained as much as 11 billion barrels of oil and natural gas — equivalent to estimates of oil and gas reserves in the South China Sea. Two of the blocks were not awarded because they received no bids.

But the day’s bidding nonetheless indicated strong interest in venturing further into the Gulf of Mexico.

“You hit all the points: multinationals, majors, eight out of 10, national oil companies, geographic diversity,’’ said Duncan Wood, the director of the Mexico Institute at the Wilson Center in Washington. “It’s a resounding success.”

In a separate auction, BHP Billiton offered $624 million to team up with state-owned Petróleos Mexicanos, or Pemex, to develop a field called Trion, in what will be the first joint venture in the Mexican company’s 78-year history. BHP Billiton beat out the British oil giant BP, which offered $18 million less.

Pemex will also be a minority investor in a block won by a team led by Chevron.

“It’s clear it’s a great opportunity for everyone, including Mexico,” Ali Moshiri, president of Chevron Africa and Latin America Exploration and Production, told reporters shortly after the auction. “Everybody in the oil and gas sector is interested in Mexico, especially the deepwater.”

The auction provides a rare moment of positive news in a gloomy period for Mexico. The peso has been battered by concern that the administration of President-elect Donald J. Trump will renegotiate the North American Free Trade Agreement, which is the foundation of Mexico’s manufacturing exports.

The new entrants to Mexico’s oil industry are expected to invest about $40 billion as they develop the deepwater fields.

The auctions were the result of Mexico instituting energy reform legislation in 2013 and 2014, which ended the 75-year-old monopoly of Pemex and opened the country to foreign investment for oil exploration, production, pipeline construction and other energy ventures. The effort was viewed as the only way to end years of declining production.

Pemex did not have the financial or technical skill to exploit the deepwater reserves on its own.

The timing of the auction could have been better. Oil prices are half what they were a little more than two years ago, when a barrel of oil cost more than $100 a barrel. Today it is just over $50 a barrel, and companies are spending far less on exploration. But Monday’s bidding indicated a long-term optimism.

Global concerns about climate change and the sluggish global economy have slowed, but not stopped, growth in demand for oil and natural gas. Energy analysts say that even if oil demand peaks in the next decade or so, oil companies will still have to drill new wells because older wells decline over time. Shale wells, which are common in the United States, normally decline the most rapidly.

The successful auction highlights the fact that drilling in the Gulf of Mexico is a better bet than drilling in the Arctic, which is extremely expensive and risky, or in many places in Africa or the Middle East, which are politically volatile.

Close to the United States and its giant market and refineries, Mexico’s Gulf waters also offer plentiful pipelines, ports and other energy infrastructure. And while drug violence is prevalent in Mexico, the country has been politically stable for decades.

Another winner in Monday’s auction was BP.

Just last week, only a day after oil prices stabilized with the OPEC agreement to cut production, BP decided to move ahead with a $9 billion project to drill in the Gulf of Mexico in a field in United States waters where the company already operates.

BP’s announcement likely had nothing to do with the OPEC agreement. But the two developments breathed new life into Gulf oil production development, which was slowed by the BP Deepwater Horizon accident in 2010 and the collapse in oil prices two years ago.

Much of the region has been heavily tested with seismic equipment, and four of the auctioned blocks are adjacent to areas in the United States portion of the Gulf. Oil executives said they would thoroughly assess the areas before drilling, but they were confident that the fields would be productive.