California's state assembly passed a bill Tuesday that would require the state to generate all of its energy from renewables by 2045.

Despite an intense lobbying campaign by utilities and the fossil fuel industry, the bill passed the assembly 43-32.

The bill must now go back to the state Senate, but it is expected to go to the desk of Democratic Gov. Jerry Brown by the end of the week.

“This is a massive victory for Californians who’ve been demanding a swift transition to clean energy in the state," said May Boeve, executive director of the anti-fossil fuel group 350.org.

Boeve's group has been calling for a transition to 100 percent renewable energy by midcentury, and an end to all coal mining and oil drilling, as the only way to address the threat posed by global warming. The group's political arm is also actively endorsing candidates that support its aggressive renewable energy agenda going into the November midterm elections.

"With wildfires intensifying and temperatures skyrocketing, the impacts of climate change across the Golden State are impossible to ignore," Boeve added. She noted a new climate assessment released Monday by the state that said wildfires and other natural phenomenon will only grow worse in the coming years.

Acitvist billionaire Tom Steyer used the vote to poke at the Trump administration.

“With the Trump administration hellbent on rewarding corporate polluters, SB 100 will help us protect our clean air and water, create good-paying jobs, and ensure California remains a center of innovation and a leader on climate action," Steyer said.

"Californians have shown the will to stand up for fundamental human rights, and we remain committed to a cleaner and more just future for all.”

California, if the bill is signed into law, will be the second state after Hawaii to enact a 100 percent renewable energy law.

The vote on the bill comes ahead of a major summit hosted by Gov. Brown in September, called the Global Climate Action Summit.