A cold snap in Argentina led to electricity and natural gas shortages this week, idling factories and taxis and causing sporadic blackouts in the capital.

Beset by the coldest May since 1962, millions of residents fired up space heaters, straining Buenos Aires' electrical grid for three nights and forcing authorities to slash power supply nationwide and briefly cut domestic natural gas provisions and exports to Chile.

Grumbling taxi drivers waited for hours in lines stretching several blocks to fill up their black-and-yellow cabs with scarce compressed natural gas. Some protested by tossing garbage into the streets during rush hour Thursday, causing traffic jams.

"I went all over town to 15 service stations and couldn't find compressed gas anywhere," said Ernesto Gorena, whose taxi was among some 70 percent of the city's natural gas-powered fleet that was temporarily idled.

Temperatures hit the freezing point or dipped below for three successive nights in the capital, which has not seen snow in years. Such cold is rare for the southern-hemisphere autumn in Buenos Aires, which normally sees temperatures in the 40s and 50s Fahrenheit or higher this time of year.

Critics said the three-day blast of Antarctic air - which is also blamed for 23 deaths from exposure as well as fires from faulty heaters - has brought to light weaknesses in the nation's plan for meeting rising energy demand.

Political analyst Rosendo Fraga said Argentina's energy woes date to a 2002 economic crisis, when regulators froze rates for home utility bills just after the peso devalued more than 70 percent against the dollar. Since then, far less revenue has been available for upgrading and building plants and other infrastructure.

"A lack of investment in the energy system, in great part generated by the freeze on utility rates, has created a situation which soon or later could explode," Fraga said.

Many factories went idle this week when distributors shut off or reduced gas supplies to give priority to homes. Government regulators also ordered an 800-megawatt electricity cut nationwide for four hours Wednesday night, which led to sporadic blackouts in the capital.

At a shampoo and detergent factory in suburban Buenos Aires, executive Alberto Rodriguez said workers had to race to meet production goals after one outage.

"The lights went out for several hours," Rodriguez said. "To a greater or smaller extent, we are all suffering from a lack of energy and gas."

On Thursday, officials said there was enough energy to meet demand as temperatures warmed, and they defended their response to the cold snap.

"The energy system during the days of extremely low temperatures responded well," said Julio De Vido, the nation's top energy planner. He called the cold an "extraordinary climate event unseen here in 45 years."

He said Argentina imported energy from Brazil and Uruguay to meet surging demand, and compressed gas supplies had been restored to service stations.

The shortages also had a ripple effect in neighboring Chile, where authorities scrambled to provide energy after Argentina slashed natural gas exports. De Vido confirmed that Argentina resumed shipments to Chile on Wednesday.

Energy analyst Gerardo Rabinovich said more problems could be on the way in the next two years before a series of new gas-fired generating plants commissioned by the Argentine government are up and running.

"Cold weather always produces energy usage peaks and problems," Rabinovich said, adding that Argentina "sneezed" when the freezing temperatures hit. "As in medicine, the fever doesn't just happen on its own; it happens as a result of some underlying disease."