ALBUQUERQUE, N.M. — As New Mexico's elected leaders wrangle over raising taxes to plug a budget shortfall, major multinational energy companies have quietly spent more than $13 billion in recent months on assets in the state's oil and gas hot spots.

The new wave of investment bodes well for the industry being able to generate much-needed revenues for the struggling state over the long haul, analysts said.

Credit rating agency Standard & Poor's Global Ratings on Tuesday predicted a turnaround in economic output for New Mexico in the near term, pointing to more growth in the oil and mining sectors in 2017.

The interest from companies such as Texas-based EOG Resources, ExxonMobil and Marathon Oil started last fall and is carrying into this year despite prices remaining around $50 a barrel.

"The way costs have come down and industry has restructured itself, they've found ways to make money at these prices. So they're locking in, and they expect to keep ramping up production and drilling and putting people back to work," said Andrew Dittmar, a senior analyst with Houston-based energy research firm PLS Inc.

The value of land in the Permian Basin, which includes stretches along the Texas-New Mexico border, also has increased rapidly because of the continued interest. Acreage in New Mexico is now going for twice the amount companies paid back in September, Dittmar said.

New Mexico also led the nation last week in the number of new rigs added to the count, and state officials have been pulling in record earnings during monthly lease sales. The State Land Office is on track to exceed projections for this fiscal year by tens of millions of dollars.

The uptick in the industry can't come soon enough as development in oil- and gas-rich corners of the state contribute about one-third of the revenue New Mexico uses each year to pay for education, public safety and other government services.

Battered by the downturn in commodity prices and a sluggish economy, state coffers have yet to feel the full effects of the new investments.

"The fact is oil and gas is the most important industry for the state from an economic and jobs perspective," said Ryan Flynn, head of the New Mexico Oil and Gas Association. "When oil and gas is doing well, New Mexico is thriving. When oil and gas is hurting, New Mexico hurts."

In southeastern New Mexico, communities have learned to weather the ebb and flow of oil prices. Hobbs Mayor Sam Cobb said Monday that revenues from gross receipts taxes dropped by about 40 percent during the downturn, but his city had squirreled away funds during the previous peak.

With Hobbs sitting at the edge of one of the country's most prolific basins, Cobb is optimistic.

"The Permian has all of the right pieces in terms of the logistics, access to labor, year-round operational capacity, all those things. I think if we can continue to maintain a public policy regarding the export side, we'll continue to see growth in the region," he said.

In northwestern New Mexico, local leaders are excited about Houston-based Hilcorp Energy Co.'s decision to buy up to $3 billion in natural gas assets from ConocoPhillips. They see it as a shot in the arm for a region facing uncertainty over the future of two coal-fired power plants and the mines that fuel them.

Analysts and others say the deep pockets of the companies that are now invested in New Mexico will play a role in the longevity of this latest wave of activity.

"They're all companies that have reputations. When they move into an area, they have plans that stretch years out," Dittmar said. "When they decide to make a move, they're determined and they follow through. So we expect that there's decades worth of activity to be had there."