CANBERRA, Australia — A rush by Australia’s state governments to switch to clean electricity sources could undermine the country’s energy security, the federal government warned Thursday after all of South Australia state lost power.

The state’s power operator, however, said the outage was unavoidable regardless of electricity sources, and the opposition accused the ruling party of using the crisis to score political points.

South Australia state lost power on Wednesday as it was lashed by two tornados, thunder storms and fierce winds that caused traffic chaos, stranded people in elevators and prompted police to warn residents to stay inside. Lightning struck a power plant and at least 22 transmission towers were toppled by high winds, officials said.

The state is 40 percent bigger than Texas, covering more than 980,000 square kilometers (380,000 square miles) and is home to 1.7 million people.

More than 90 percent of the state’s households had power restored by Thursday, including the state capital, Adelaide. But state Premier Jay Weatherill said some households in the state’s rural north could be without power for days.

The conservative federal government said the blackout was caused by extreme weather, but questioned whether South Australia’s heavy reliance on solar and wind-generated power made its network less resilient.

South Australia, which is governed by the center-left Labor Party, gets 41 percent of its power from renewable energy sources, more than any other state after Tasmania which is mostly powered by hydro-electricity. South Australia plans to increase that share to 50 percent by 2025.

“There is no doubt that a heavy reliance on intermittent, renewables … does place very different strains and pressures on a grid than reliance on traditional base-load power,” Prime Minister Malcolm Turnbull told reporters.

“Energy security should always be the key priority,” he said. “I regret to say that a number of the state Labor governments have over the years set priorities and renewable targets that are extremely aggressive, extremely unrealistic and have paid little or no attention to energy security.”

Most of Australia’s electricity comes from coal-fired power stations, making Australia one of the world’s worst greenhouse gas emitters on a per capita basis.

Weatherill said power surges triggered by the weather caused the state’s coal-fired generators and links to the national grid to shut down to protect themselves, resulting in the statewide blackout.

“This was a weather event, this was not a renewable energy event,” he told reporters.

Simon Emms, executive manager of ElectraNet, the company which operates the state electricity infrastructure, said the blackout could not have been avoided given the weather conditions.

“I’m not aware of any system in the world that could handle losing that much generation that quickly without going into a blackout,” Emms told reporters.

Michael Brear, a Melbourne University mechanical engineer and director of the Melbourne Energy Institute, said the blackout needed to be investigated to determine what impact, if any, renewable energy had.

“Where you have higher levels of intermittent renewables in any network, there are greater issues of the reliable operation of that network,” Brear said.

Federal Energy Minister Josh Frydenberg said he would call state leaders together to discuss how to avoid a repeat of such an outage, saying the states had set “unrealistic targets” on boosting renewable energy.

He wants the states to adopt a federal target of increasing Australia’s reliance on renewable energy from 15 percent now to 23.5 percent by 2020.

The conservative government of New South Wales, Australia’s most populous state, plans to increase its renewable energy share from 14 percent now to 20 percent by 2020.

The Labor government of Victoria, the second most populous state, plans to increase its reliance on renewable energy from 12 percent now to 40 percent by 2025.

The Labor government of Queensland, the third most populous state, plans to go from 4.5 percent renewable energy now to 50 percent by 2030.

Federal Labor leader Bill Shorten accused Turnbull of politicizing a natural disaster.

“The fact that we’ve had a one in 50-year storm is not due to renewable energy, it’s due to the weather,” Shorten told reporters.