Eighteen months after Hurricane Maria hit Puerto Rico–an island-wide blackout that was the longest in the history of the U.S. that helped contribute to the thousands of deaths from the storm –the island is now planning to shift to 100% renewable energy.

A Puerto Rico Senate bill that would move the island to 100% renewables by 2050 just passed, and the governor is expected to sign it within a month. “After Hurricane Maria, a new consensus was really built in Puerto Rico,” says Javier Rua-Jovet, director of public policy in Puerto Rico for Sunrun, a solar power company that worked with others to give input on the bill. “Everybody knew that a different system had to be built.”

In the wake of the storm, several companies and organizations worked to install solar panels and batteries at hospitals, community centers, and at critical infrastructure sites like a sewer treatment plant. Sunrun installed solar power at fire stations. These were emergency projects, but there was a growing understanding that renewable energy made sense for the island at a large scale.

Even before the hurricane, Puerto Rico’s electric grid was unusually vulnerable. Power plants were decades older than the average in the United States. Most power was generated on the southern part of the island, and had to travel over mountains on long, difficult-to-repair transmission lines to get to the population centers in the north. Around half of the island’s electricity comes from imported oil, which makes power more expensive for Puerto Ricans than for Americans living on the mainland. Solar and wind power are more affordable and allow electricity to be generated closer to where it’s being used; the island has an abundance of sunshine and flat roofs that can hold solar panels. PREPA, the island’s utility, which had gone bankrupt a few months before the storm, had been slow to adopt any renewable energy in the past. But things changed after Maria hit. “Even the usual opposer to these things, which was the utility, really has a new narrative that that that includes solar and storage at its core,” says Rua-Jovet.

Puerto Rico’s new 100% renewable goal follows Hawaii, which has a law requiring 100% clean electricity by 2045. In 2018, California also set a goal to reach 100% renewables by 2045, with an interim goal of 60% by 2030. This month, New Mexico was the third state to set a target of zero-carbon electricity by 2045. Puerto Rico, with a population more than 13 times smaller than California, could arguably transition more quickly than its 2050 goal. Hundreds of millions in federal funding for hurricane recovery will help Puerto Ricans to install solar and energy storage themselves, and the technology continues to get cheaper. The policies to support a large-scale shift are now in place, Rua Jovet says. “I think there are many elements that give hope in terms of fast deployment,” he says.

Correction: This story has been update to reflect that the bill has not passed yet, it’s still being voted on. Update: Now it’s passed.