Wilfido Briñez considers himself lucky to live with the roar of electric generators outside his front door in Maracaibo, Venezuela's second-largest city and ground zero for the nation's rolling blackouts.

While many of his neighbors sit in the dark waiting for the lights to come back on, the university professor charges his phone and grades students' papers on his laptop. Food in his refrigerator stays cold and the air conditioner hums.

“The decibel level is quite high,” said Briñez, speaking above three gas-fueled motors. “Either we have noise or we don't have electricity.”

As Venezuela's crisis deepens, the sale of electric generators is one of the few growth industries in the once-wealthy oil nation, whose residents struggle to get through each day as public services crumble.

Millions of poor live at the mercy of Venezuela's unstable power grid, but middle- and upper-class residents able to scrape together enough dollars are buying backup generators in an attempt to regain a normal life.

Even this solution isn't foolproof. Gasoline shortages are creeping across the country, imperiling access to fuel for newly bought generators.

“Here, things have gone from bad to worse,” said Junior Cansas, who owns an electronics shop in Maracaibo. “That's why people are buying generators.”

Venezuela holds the world's largest oil reserves as well as vast water resources to fill hydroelectric dams. It long had a state-of-the-art power grid that sold excess electricity to neighboring countries.

However, the country's growing dysfunction crossed a dark milestone on March 7 when a catastrophic power failure left most of its 30 million residents without electricity for days. It even reached the capital of Caracas, knocking out communications, water services and public transportation.

That led to a scramble for generators by residents and small businesses fearing another big outage could hit without warning, plunging their lives once again into chaos.

Some have opted for small units costing a few hundred dollars that can pump out enough power to run a few appliances at a time, such as using the lights and water heater for a shower.

A household living with all the amenities requires a large generator that can cost upward of $1,000, a small fortune in a country where the typical worker earns $6.50 a month.

Critics blame Venezuela's crisis on the socialist “revolution” President Hugo Chávez launched 20 years ago, saying he allowed corrupt officials to loot the national coffers while public infrastructure fell into disrepair. For his part, current President Nicolás Maduro accuses the Trump administration of sabotaging the power grid in a bid to overthrow him and install a puppet government led by opposition politician Juan Guaidó.

Elio Burguera runs an engineering firm based in Caracas that installs electrical systems for factories, luxury apartment buildings and five-star hotels. But these days, his phone constantly rings with clients desperate to install fuel-powered generators in homes. He's even bought one for his own family.

“We are in a difficult economic situation, not for just the poor people,” Burguera said. “The middle class is suffering a lot.”

Ana Lucia Gomez, a personal shopper based in Orlando, Florida, recently launched a business shipping hard-to-find comfort items such as M&M's, bed sheets and laundry detergent to customers struggling in her native Venezuela. After the massive blackout, she was surprised to start getting requests for generators. Now it's about a third of her business.

“They're living in a state of mental chaos,” said Gomez, who purchases the items at such local retailers as Home Depot. “They say it's unbearable to go so many hours without electricity.”

The situation is especially dire in Maracaibo, once known as Venezuela's Saudi Arabia for being at the hub of the country's now-decaying oil industry. Power plants put out a fraction of their potential, and the lights have flickered on and off since late 2017, when a major transmission line burned up.

The nationwide blackout in March took the lights out for eight days in Maracaibo and sparked massive looting that shuttered many businesses. Lines to fill up a car with gasoline stretch a mile and often require a two-day wait.

A street-side kiosk selling candy, cigarettes and bottles of Coke had a single generator displayed on the sidewalk for $680.

Briñez, a 52-year-old professor of veterinary sciences, said he realized during the March blackout that the government wasn't going to fully restore his city's power anytime soon, as officials had been promising.

So he dipped into his emergency savings, asking relatives in Florida to buy a generator that cost him well over $1,200 to ship and install.

He lives in a gated community of eight homes, where the lights dim each night around 8 p.m. and stay out until the next morning. Seven of the homes occupied by his relatives either already have generators or they're en route in shipping crates.

While 3.7 million Venezuelans have abandoned their country in recent years, going abroad for a better life, Briñez said that's not an option for him.

He worries about his 75-year-old father, who suffers from diabetes, heart complications and high blood pressure. Maracaibo's sweltering heat approaches 100 degrees most days, making the air conditioner a must.

“It's a big expense,” Briñez said. “Once you decide to stay in this city, you either buy a generator or you're going to have big problems.”

Scott Smith reports for the Associated Press.