New York (CNN Business) Chevron's nearly century-long relationship with Venezuela might not survive the Maduro regime's fight with the United States. Not only is Venezuela's infrastructure crumbling, but the OPEC member's national oil company has been sanctioned by the Trump administration.

, the last major US oil company still operating in Venezuela, could be forced to leave unless US officials extend sanctions waivers scheduled to expire on July 27. A Chevron exit would follow on the heels of other major American companies that have retreated from the chaos in Venezuela in recent years.

A loss of Chevron's expertise and resources would only make matters worse for Venezuela's oil industry, which is already on the brink of collapse under President Nicolas Maduro. And it could trigger losses for Chevron in a major market it's spent decades sinking time, money and sweat into.

"If Chevron leaves, the country will almost certainly nationalize its oil assets," said Muhammed Ghulam, an energy analyst at Raymond James. "Maduro is in a fight for his country. He needs all the cash and resources he can get."

Sanctions waivers expire soon

ExxonMobil XOM ConocoPhillips COP Chevron is one of the leading private oil companies in Venezuela, which has more proven oil reserves than any other nation on the planet.andleft years ago, after former Venezuelan President Hugo Chavez started nationalizing foreign-run oilfields.

Chevron currently has five onshore and offshore production projects in Venezuela with PDVSA, the national oil company. Chevron even established its Latin American headquarters in Caracas

In January, US President Donald Trump imposed tough sanctions on PDVSA in a bid to push out Maduro. Those sanctions prohibited American companies from doing business with PDVSA.

Halliburton HAL Schlumberger SLB Baker Hughes BHGE Weatherford International WFTIF However, the US Treasury Department granted six-month waivers to Chevron and five oil services companies:and. Those waivers, set to expire on July 27, allow the companies to conduct transactions and activities with PDVSA.

Chevron produced 40,000 barrels per day of oil and natural gas in Venezuela during the first quarter.

"Our operations in Venezuela continue in compliance with all applicable laws and regulations," Chevron said in a statement to CNN Business.

Chevron declined to say whether it has requested that US officials extend the waivers.

If the waivers lapse and US sanctions remain in place, analysts said that Chevron would need to suspend its joint ventures with PDVSA.

"There is no other way to interpret it," said Clayton Allen, senior vice president of trade, policy and geopolitical risk at Height Capital Markets.

US companies have retreated from Venezuela

Chevron would join a long list of other American companies that have been forced to step back from Venezuela.

Delta Air Lines DAL United Airlines UAL General Motors GM Ford F In 2017,andsuspended flights to Caracas because of the country's instability.shut its operations that same year after government authorities seized its plant.also briefly suspended operations.

'Deteriorating' environment in Venezuela

Venezuela's oil industry is in deep decay, due to widespread power outages, mismanagement and decades of under investment. The country's oil output had already plunged to a 30-year low prior to the US sanctions taking effect. The International Energy Agency described it as the biggest drop in history for a sizable producer.

Still, Chevron produced an average of 40,000 barrels of oil and natural gas in the country during the first quarter of 2019, according to SEC filings. That's down from 44,000 barrels during 2018, most of which was crude oil.

"The operating environment in Venezuela has been deteriorating for some time," Chevron warned in a May filing.

Chevron said that "future events" could cause the environment in Venezuela to become "more challenged," leading to "increased business disruption and volatility" in financial results.

Venezuela represents a very small portion of Chevron's overall production, which rose to 3 million barrels per day in the first quarter.

Still, leaving Venezuela would cause a loss of earnings and likely lead the company to write down at least a portion of the value of its assets there.

In early 2018, Halliburton took a $265 million pre-tax charge to write down the oil service company's entire remaining investment in Venezuela.

"We are continuing our limited operations in Venezuela," Halliburton said in a recent SEC filing, "and are evaluating our operations" in advance of the July 27 termination of the sanctions waiver.

Halliburton declined to comment further on the matter. Representatives from Baker Hughes, Schlumberger, and Weatherford similarly declined to comment or were not reachable.

Chevron's long history in Venezuela

Chevron's ties to Venezuela trace back to 1920 when the company started exploring for oil. Eventually, a giant oilfield now known as the Boscan Field was discovered in the western portion of the country in 1946.

Today, Chevron owns a 39% stake in a joint venture with PDVSA that produced 16,000 barrels per day of oil in the Boscan Field, which is located in the state of Zulia.

Chevron also owns stakes in three other onshore production joint ventures, two of which operate in Venezuela's Orinoco Belt.

In addition to developing these projects, Chevron has put money back into the local communities in Venezuela.

Between 2006 and 2016, Chevron said it invested more than $94 million in areas it operates in Venezuela as well as on national cultural programs. Those investments include a modern math and reading instruction program that supports 1,000 teachers and nearly 10,000 children in Venezuela.

Now Chevron is mulling whether it will need to leave Venezuela.

Risk of nationalization

If the sanctions waivers aren't renewed and Chevron leaves, the hope is that the company would be able to resume its operations once relations between the United States and Venezuela improve.

However, analysts warn that would be no easy task. Venezuela's energy infrastructure is falling apart -- and a pause in activity would only worsen it.

"If any foreign company came back in, there would need to be an immediate and massive injection of capital -- just to bring things back to the levels of 2017 and 2018," said Height Capital's Allen.

The big concern is that the Maduro government will seize Chevron's oil assets if the company decides to leave. Chevron would need to take writedowns. Help from international courts could take considerable time.

"It ultimately might take a decade or two," said Jim Rebello, head of the energy M&A practice at the consultancy Duff & Phelps.

Rebello said he worked at a predecessor to Weatherford when the company's oil assets in Iran were nationalized.

"We had six drilling rigs in Iran that we never got back," he said.

Chevron knows firsthand about that risk.

Venezuela nationalized its oil industry in the mid-1970s, prompting Chevron and other foreign companies to leave. Chevron didn't return until 1996.