CARACAS, Venezuela — The United States said Tuesday it would pull its remaining diplomatic personnel from Venezuela this week, rupturing relations as the socialist South American country plunges deeper into chaos.

Venezuelan society appears to be unraveling amid a nationwide blackout and critical water shortages that have worsened already dire conditions. The United States has been leading an international effort to force President Nicolás Maduro from power and has recognized opposition leader Juan Guaidó as the rightful president of the country.

As tensions mounted in Venezuela, Attorney General Tarek Saab announced that Guaidó was being investigated in connection with alleged sabotage of the national electrical system — which the government blames for the blackout that began last Thursday. 

Guaidó was already under investigation for “violent occurrences” in the country since January, when his opposition movement took off. He brushed off the new allegations. “We know who is responsible for the tragedy that our country is living, and it’s Maduro,” he said, appearing at anti-government demonstrations around Caracas. 

Analysts said they doubted that the popular opposition leader would be detained. The charges appeared to be part of a government “strategy to buy time” in hopes that protests ran out of steam, said Luis Vicente Leon, a Venezuelan analyst and pollster. In Washington, Elliott Abrams, the U.S. special envoy for Venezuela, warned that the incarceration of Guaidó “would lead a lot of countries to react very quickly.” 

Secretary of State Mike Pompeo said in a statement early Tuesday that the U.S. government was withdrawing its diplomats because of “the deteriorating situation in Venezuela as well as the conclusion that the presence of U.S. diplomatic staff at the embassy has become a constraint on U.S. policy.” 

But Venezuelan authorities said they had already informed the American diplomats Monday that they were being kicked out. In a statement, the Venezuelan Foreign Ministry said it was concerned that the White House would use “protecting its diplomatic personnel” as a “pretext” for armed action. Venezuela, the statement said, was ready “to maintain channels of communication” if relations were respectful.

Fears of a Libya-style collapse in Venezuela are growing, a threat that has raised the specter of the 2012 assaults on U.S. compounds in Benghazi that resulted in the deaths of Ambassador J. Christopher Stevens and three other Americans.

Armed pro-government militias known as “colectivos” have escalated attacks in recent weeks, opening fire on civilians and terrorizing communities. Venezuelans already suffering from food and water shortages have become so desperate during the current wave of blackouts that they have started looting stores and collecting water in sewage drains. Electricity was gradually being restored to more parts of the country on Tuesday. But the humanitarian disaster is expected to intensify in coming weeks as recently imposed U.S. sanctions begin to ripple through the economy.

Maduro has blamed the blackouts on sabotage by the United States and its allies in Venezuela. But experts in electrical production have said they were probably caused by poor maintenance and the inability to keep skilled workers on staff.

Analysts said the departure of the U.S. diplomats could make it more difficult for Washington to be in touch with opposition leaders.

“Its ability to collect information directly and play an active role in Venezuela will be very limited,” said Mariano de Alba, a Venezuelan international affairs expert.

However, he said, the withdrawal of the embassy personnel could pave the way for Washington to take tougher actions, without having to worry about retaliation against its diplomats. As Venezuela desperately tries to find new customers for its oil after the loss of its main market — the United States — the American government is using the threat of sanctions to discourage other countries from purchasing the petroleum. 

Abrams said the decision to withdraw the diplomats reflected the deteriorating conditions in the country, particularly since the blackout began. A skeleton staff of about 20 diplomatic personnel — assisted by local employees — has been manning the sprawling U.S. Embassy complex on a picturesque hill in Caracas. Like some hotels and restaurants, the embassy had continued to run on a generator, but diesel fuel to run the generators is increasingly difficult to obtain.

“Generators require fuel. The embassy requires water. The embassy’s own situation also had a finite number of days,” Abrams said. He added that the Venezuelan government is no longer able to provide security to the U.S. compound.

As Maduro’s government struggled to restart electrical and water service to the country, local media reported that a prominent journalist and radio host, Luis Carlos Diaz, had been arrested by intelligence agents. He was taken to the Helicoide, the infamous jail for political prisoners, according to the National Union of Press Workers.

The government did not immediately say why Diaz had been was arrested. His detention came a day after a pro-government TV show broadcast a report alleging that he was involved in planning the blackouts — a claim his colleagues dismissed as ridiculous.

“I am profoundly worried about the detention of the noted journalist @LuisCarlos by Venezuelan intelligence services and about his well-being,” tweeted Michelle Bachelet, the U.N. high commissioner for human rights and former president of Chile.

More than 35 journalists, locals and foreigners, have been detained by security forces this year. Most of them were later released or deported

Although U.S.-Venezuela ties have been strained for years, they began unraveling rapidly in January, when the Trump administration called for Maduro to resign and recognized Guaidó as the country’s leader, citing what it called a fraudulent election last year. At least 50 other countries have done the same. 

In response to the U.S. actions, Maduro ordered the expulsion of U.S. diplomats.

The United States in January also slapped strong sanctions on Venezuela’s pivotal oil sector, effectively cutting off the nation’s single largest source of hard currency.

A temporary agreement allowed a small number of diplomatic personnel to remain in each nations’ capitals as Washington and Caracas sought to establish more limited interest sections. 

That agreement expired Monday. U.S. staff members are expected to leave by Friday. 

Faiola reported from Miami. Andreina Aponte and Mariana Zuñiga in Caracas, Rachelle Krygier in Miami, Carol Morello and Karen DeYoung in Washington and Paul Schemm in Addis Ababa, Ethi­o­pia, contributed to this report.