New York has become the first US state to pass a law banning gas stoves and other fossil fuels in most new buildings, in a victory for environmental activists.
The legislation adopted by lawmakers in the Democratic-run state legislature late Tuesday will require newly built homes to be all-electric in three years' time.
The move aims to tackle climate change by reducing New York's dependence on natural gas.
"Changing the ways we make and use energy to decrease our reliance on fossil fuels will help ensure a healthier environment for us and our children," said state assembly speaker Carl Heastie.
The law, which could face legal challenges from the gas industry, will require solely electric heating and cooking in new buildings under seven stories from 2026.
For taller skyscrapers, the deadline is 2029.
Hospitals, critical infrastructure such as transportation, and commercial food establishments will be exempt.
The law will also not apply to buildings where the local grid is not capable of handling the load.
Existing buildings are also not affected by the legislation, meaning residents can keep gas stoves they already have.
The appliances became an unlikely flashpoint in America's bitterly partisan politics earlier this year when a federal official suggested the government might ban new gas stoves over concerns they cause harmful air pollution indoors.
Representatives from the fossil fuel industry and Republican allies slammed the comments by Richard Trumka Jr, a member of the US Consumer Product Safety Commission, and the White House was forced to clarify that stoves would not be banned.
According to the US Energy Department, 52 percent of households in New York state use natural gas for heating or cooking.
New York's measure was included in a $229 billion budget that local lawmakers approved for the state.
The budget also authorizes the New York Power Authority, the state-owned public utility provider, to build and operate renewable energy facilities.
That move is to help New York meet its goal of reducing emissions by 85 percent by 2050.