Image copyright Getty Images Image caption California is challenging Mr Trump's decision to scrap his predecessor's environmental policies

California legislators have voted to extend a law to cut carbon emissions, weeks after President Donald Trump said the US would withdraw from the Paris climate accord.

The policy, which requires firms to purchase permits to release pollutants, will be extended to the year 2030.

California Governor Jerry Brown said Republicans and Democrats had taken "courageous action" with the move.

The US state aims to cut greenhouse gases by 40% from 1990 levels by 2030.

"Tonight, California stood tall and once again, boldly confronted the existential threat of our time," Mr Brown said in a statement on Monday. "That's what good government looks like," he added.

However, the vote to extend the cap-and-trade programme beyond 2020 was opposed by some conservatives who said the measure would hit the poor by increasing prices for fuel and food.

California State Senator Andy Vidak said it represented a "regressive" tax that would not make any impact on climate change.

"We could shut down the entire state of California and it would have no effect on the global climate," Mr Vidak said.

After hours of negotiations on Monday, California's State Assembly finally voted 55 to 21 to put the legislation forward to Mr Brown.

The move puts the most populous US state at odds with Mr Trump, who said last month that he was withdrawing the US from the 2015 Paris climate agreement with the aim of negotiating a new "fair" deal that would not disadvantage US businesses.

The pioneering cap-and-trade plan sets a limit on emissions of greenhouse gases and allows companies, such as factories and refineries, to buy and sell permits to emit carbon dioxide.

Some environmentalists, however, say the legislation does not go far enough as it contains too many concessions to oil companies.

Image copyright Getty Images Image caption Jerry Brown said California was "standing tall once again"

California is one of the leading states to challenge Mr Trump's decision to scrap the environmental policies of his predecessor, Barack Obama.

The US state's ambitious aim to reduce greenhouse gas emissions by forcing companies to pay for their carbon pollution has been praised by global leaders.

Mr Brown has previously argued that the 40% reduction target for 2030 must be met for the sake of future generations.

California is the second-biggest producer of carbon dioxide through fossil fuels among US states.