New York (CNN Business) Chevron received a last-minute reprieve from the Trump administration Friday that will allow it to continue operating in Venezuela. Chevron is the last remaining major American oil company in the crisis-ravaged country.

The US Treasury Department granted three-month extension of sanctions waivers that were scheduled to expire at midnight. The decision gives Chevron and four US oil services companies permission to continue doing business with national oil company PDVSA, which has been sanctioned by the Trump administration.

Treasury provided no reason for granting the extension, which expires October 25, 2019.

A retreat from Venezuela would have dealt a financial and emotional blow to Chevron, which has spent nearly a century sinking resources into the nation. Venezuelan President Nicolas Maduro could have even seize Chevron's assets by nationalizing them.

And a forced exit by Chevron would have only deepened the historic decline of Venezuela's oil industry, which is already grappling with a humanitarian crisis, infrastructure nightmares, tough US sanctions and gross mismanagement.

"Our focus is operations in Venezuela continue in compliance with all applicable laws and regulations," Chevron said in a statement on Friday.

Chevron said that its focus is on "maintaining the safety of the operations and supporting the more than 8,000 people who work with us as well as their families."

Chevron, one of the leading private oil companies in Venezuela, supports more than 8,000 people in the crisis-stricken country. The company produced an average of 40,000 barrels of oil and natural gas in Venezuela during the first quarter.

Halliburton HAL Schlumberger SLB Baker Hughes BHGE Weatherford International WFTIF The Treasury Department's extension also applies to four American oil services companies operating in Venezuela:and

The sanctions relief does little to solve the many problems facing foreign energy companies in Venezuela. PDVSA faces persistent cash shortages and repeatedly has had problems paying partners and suppliers.

"The risks of working in Venezuela far outweigh the potential benefits," said Pavel Molchanov, an energy analyst at Raymond James. "There is nothing the US government can do to PDVSA that is anywhere near as destructive as what the Maduro regime has already done by itself."

Subdued oil prices could have given the Trump administration extra leeway to crack down further on Venezuela without fear of causing a spike in gasoline prices at home. Despite elevated tensions between the United States and Iran, oil prices have been under pressure from robust production from West Texas , the heart of the US shale oil boom.

Earlier this week, Venezuelan opposition leader Juan Guaido pledged on Twitter to protect Chevron's assets in Venezuela if US officials don't renew the license. While Washington and other Western capitals have recognized Guaido as Venezuela's legitimate leader, he has little power to enforce that pledge given that Maduro remains in charge.

In January, US President Donald Trump imposed punishing sanctions on PDVSA in an effort to force Venezuelan President Nicolas Maduro from power. Those sanctions prohibited American companies from doing business with the national oil company.

ExxonMobil XOM ConocoPhillips COP Mondelez MDLZ Bridgestone BRDCY Colgate CL Kimberly-Clark KMB andleft Venezuela years ago following the nationalization of foreign-run oilfields by former Venezuelan President Hugo Chavez. More recently, Pepsi wrote off its business in Venezuela in 2015 and took a $1.4 billion loss.andhave also shut down their Venezuela operations.

Venezuela represents a very small chunk of Chevron's total production, which climbed to 3 million barrels per day during the first quarter. Still, leaving Venezuela would cause a loss of earnings for Chevron and likely force the company to write down at least a portion of the value of its assets there.