A dredger sits idle at a coal pit of the Hazelwood coal-fired power plant in Hazelwood, Australia. The closure of Hazelwood, one of Australia’s biggest power plants, may spark a new bout of electricity price volatility, potentially worsening the country’s power crisis. (Carla Gottgens/Bloomberg News)

Australia, with its abundant coal, natural gas, wind and sunshine, is turning into an international case study in how not to manage energy riches.

Electricity is becoming more expensive and less reliable. This year, government officials considered shutting down parts of the power grid in the biggest city, Sydney, during sweltering summer days because the networks couldn’t meet the demand.

The entire state of South Australia, where wholesale electricity prices can fluctuate as much as 150-fold in a day, lost power when storms toppled transmission lines and shut down wind farms.

Although experts project that Australia will become the world’s biggest exporter of natural gas in two years, some companies are being quoted prices double what customers are paying in Japan, which is dependent on Australian natural gas.

Businesses are furious. Voters are angry. The prime minister, Malcolm Turnbull, recently declared an “energy crisis.”

“It takes a lot of work to stuff it up this badly,” said Tony Wood, the energy program director at the Grattan Institute, a government- and business-funded think tank, in an interview. “You’ve got to try really hard.”

The problem is caused by a combination of factors. The development of shale oil technology triggered a boom in natural gas, which is being mostly shipped to Asia from new export terminals rather than being used at home. By joining the global market, Australians are no longer getting cheap natural gas, which is used for generating electricity and for cooking and heating.

At the same time, subsidies are increasing Australians’ reliance on wind and solar power, although output is always fluctuating. Pressure to lower greenhouse-gas emissions has led to the closure of power plants fueled by Australia’s huge coal deposits, which have delivered low-cost power for over a century. One of the country’s biggest and dirtiest coal power plants was closed by its French and Japanese owners March 31.

The problem is most acute in economically depressed South Australia, where wind and solar power supply about 40 percent of the electricity and coal has been phased out entirely. Until recently the state was touted around the world as an energy success story.

But on Sept. 28, two tornadoes 105 miles apart took down transmission lines that move electricity around the state, which is bigger than Texas.

The disruption automatically shut down nine wind farms, which led to a surge in electricity being drawn from a neighboring state. The influx was so sudden that it blew the equivalent of a giant fuse in the grid. Almost the entire state was blacked out for the afternoon. Some areas were offline for 13 days.

Traffic lights stopped functioning, trains were stuck, and office buildings went dark.

Embryos stored by 12 families at a state-run fertility clinic were lost when a backup generator failed.

“It was really traumatic for them and for our staff as well,” Stefan Moro, chief executive of Flinders Fertility, said in an interview. “[Staffers] treat the embryos as though they were their own.”

The clinic recently moved into new premises and now has three backup systems. Moro said he is worried that more blackouts are likely.

Securing reliable electricity is now one of Australia’s top policy and political challenges. Eighty-one percent of Australians are concerned about the price of electricity, according to a survey by Choice, a consumer-advocacy organization.

The debate has become ideological. Conservatives want coal-fired power plants switched back on, or new ones built. Liberals are seeking bigger subsidies for renewable energy and a carbon trading system.

So much natural gas is being sold to Asia that shortages are emerging at home, prompting Turnbull to declare last month that he will limit the amount producers can sell overseas.

Political squabbling is making a solution difficult. South Australia’s premier had an on-camera argument last month with the federal energy minister about who was at fault for the state’s blackout.

“It is a disgrace the way your government has treated our state,” Jay Weatherill said after crashing a news briefing by Josh Frydenberg, the energy minister, that was carried live on cable news. “What we have is a national energy market that is broken.”

“Clearly, he has a big job to do to explain to the South Australian people why on his watch the lights went out,” Frydenberg replied.

Government officials are scrambling to shore up the network before the Southern Hemisphere summer starts in December. South Australia is so concerned that it plans to put diesel generators on standby and build a battery farm.

One possible solution: Tesla battery packs. Tesla founder Elon Musk said last month that is company would solve the problem in “100 days” or provide the batteries free. “That serious enough for you?” he tweeted.

A Tesla spokeswoman said the company had formally expressed interest in the battery contract with the government of South Australia.

Read more:

Why Trump’s rebuke could be good for Australia’s prime minister

Trump’s election triggers a debate in Australia

Australian Catholics torn over allegations against their cardinal

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news