A massive blackout has hit most of Venezuela, an anomaly even for a country that has frequent power shortages.

President Nicolás Maduro blamed "American imperialism" for starting an "electricity war" with the Venezuelan people.

Critics say the power grid is decaying because the government is not maintaining and funding it.

A massive blackout has left most of Venezuela in the dark, surprising even locals who have grown accustomed to food, medicine and power shortages.

The electricity went out in 22 out of 23 states on Thursday, and is still not working as of early Friday, The Associated Press reported.

Venezuelan leader Nicolás Maduro blamed the opposition without presenting evidence, as he commonly does in the case of a power outage.

Read more: Nicolas Maduro posted a 40-minute livestream about his plans for celebrating Carnaval as Venezuela continues to collapse

"We will defeat the electricity war American imperialism has announced and orchestrated against our people," he said on Twitter.

Jorge Rodríguez, the communications minister, went on the state channel TeleSur to denounce the "sabotage" of a power generator at the Guri Dam, one of the largest hydroelectric stations in the world.

Critics say the government has let a once impressive power grid decay because of corruption, poor maintenance and under investment.

Juan Guaidó, the opposition leader who more than 50 countries now recognize as Venezuela's rightful president, said Maduro must resign so the electricity system can be restored.

"We have water, we have petrol, we have gas. But unfortunately we have a usurper in Miraflores [the presidential palace]," he tweeted.

Locals scramble to board a bus after a power outage in Caracas, Venezuela, Thursday, March 7, 2019. (Eduardo Verdugo/AP)

When the blackout hit on Thursday at the peak of rush hour, chaos ensued on the streets of the capital Caracas as thousands of commuters were forced to leave the subway, The AP reported. Generators also shut down at some hospitals where nurses had to monitor vitals with candles.

"The person responsible for this is named Nicolás Maduro," Pedro Fernandez, a 44-year-old systems engineer, told Reuters. "This is just the tip of the iceberg given all the things we’re suffering."

Read more: A timeline of the political crisis in Venezuela, which began with claims of election rigging and has the US calling for regime change

Venezuela is engulfed in a humanitarian and political crisis. As empty supermarkets and soaring crime drive millions of refugees abroad, Guaidó is trying to unseat Maduro.

Earlier this week, the opposition leader returned to Venezuela after a 10 day exile despite government threats to arrest him.

He is currently trying to galvanize support among state employees, and is planning a public sector strike with union leaders.