The United States announced late Monday that it is pulling the remaining staff from its embassy in Venezuela, citing the deteriorating situation in the South American nation.

Secretary of State Mike Pompeo announced the decision as Venezuela struggles to restore electricity following four days of blackouts around the country and a deepening political crisis.

The U.S. will withdraw all remaining personnel from <a href="https://twitter.com/usembassyve?ref_src=twsrc%5Etfw">@usembassyve</a> this week. This decision reflects the deteriorating situation in <a href="https://twitter.com/hashtag/Venezuela?src=hash&ref_src=twsrc%5Etfw">#Venezuela</a> as well as the conclusion that the presence of U.S. diplomatic staff at the embassy has become a constraint on U.S. policy. —@SecPompeo

The U.S. has led an international effort to oust socialist President Nicolas Maduro and replace him with opposition leader Juan Guaido, who vows to hold a new presidential election. Guaido is backed by some 50 countries, while Maduro maintains support from countries such as China, Russia and Cuba.

Maduro had ordered all U.S. diplomats to leave Venezuela in late January because of its support from Guaido, but he retreated and allowed them to stay. The U.S. still withdrew dependents of embassy personnel as well as some of the staff. Pompeo said the remaining diplomats would be out of Venezuela by the end of the week.

The move came after another day of chaos as power outages that began Thursday evening continued to cause problems for Venezuelans, leaving them with little power, water and communications.

Explosion at Caracas power station

Earlier, witnesses said an explosion occurred at a power station in the Venezuelan capital as days of nationwide power cuts imposed increasing hardship on the country.

Flames rose from the electrical facility in the Baruta area of Caracas early Monday, contributing to a sense of chaos among Venezuelans already struggling with an economic crisis and a bitter political standoff.

Onlookers captured pictures of a burned electrical substation after a massive blackout in Caracas. (Carlos Jasso/Reuters)

Guaido said three of four electricity transformers servicing the area were knocked out and that state engineers are unable to fix them.

The U.S.-backed leader of the National Assembly has blamed the blackouts that began Thursday on alleged government corruption and mismanagement, while Maduro accused his adversary of sabotaging the national grid.

Maduro has accused Guaido and the U.S. of staging a "cyberattack" on the power grid.

Maduro on Sunday called the massive blackouts a "macabre strategy" to create a level of despair in the country.

The explosion occurred at a power station in the Venezuelan capital as days of nationwide power cuts imposed increasing hardship on the country. (Carlos Jasso/Reuters)

Maduro posted a video on Twitter that showed him with a two-way radio, purportedly talking to military commanders and governors.

Meanwhile, Defence Minister Vladimir Padrino Lopez said the military has been deployed to protect Venezuela's power installations from alleged saboteurs.

"We know who's behind all this," Padrino Lopez said, echoing the government line that the U.S. staged cyberattacks on Venezuela's infrastructure.

U.S. officials have dismissed the allegation as absurd.