NAM was, until 2018, responsible for assessing and paying for repairs. That role, too, has been taken over by government agencies that assess damage and bill the joint venture.

NAM has suspended dividends to its shareholders to build up its financial reserves to address the problems. NAM’s earthquake-related costs, paid out since 2012, now add up to 2.7 billion euros, according to Shell. Shell’s chief executive, Ben van Beurden, told shareholders this year that the joint venture, which has other petroleum operations, had the funds to pay “any earthquake-related costs under all scenarios.”

The gas still in the Groningen field — an estimated 17 years of the Netherlands’ consumption at current rates — fits the description of a “stranded asset,” petroleum deposits that cannot be sold and used as fuel. The companies will not be compensated for its loss, estimated at $70 billion, and the government will also be taking a hit.

The Dutch state has a 40 percent stake in the entity responsible for exploiting the Groningen field and earned, for many years, 90 percent of the profits. Now, it will receive 73 percent of the profits and pay the same share of the costs.

The process of closing Groningen is moving faster than plans to replace it. Politicians pitch the situation as an opportunity to kick the fossil fuel habit. (Gas burns cleaner than oil or coal but it is still a carbon emitter.) Large energy users like chemical producers and factories “all know that they need a new perspective,” said Nienke Homan , the Groningen regional minister for energy transition and climate. “It will be a new era for them.”

Along with backing wind and solar projects, the authorities are betting on hydrogen, a clean fuel that can be produced using electricity. Ms. Homan has been working to arrange €90 million from governments, including the European Union, and industry to create a “hydrogen valley” in the Groningen area. Natural gas pipelines would be retrofitted to carry hydrogen to power trucks, cars and factories.