Berkeley, California on Tuesday became the first U.S. city to approve a ban on natural gas hook-ups in all new residential buildings, a move that proponents argued is a needed step for all cities in the state if California is to meet its goal of shifting to net-zero carbon emissions from energy sources by 2045.

The ban was passed into law less than a week after the city council unanimously voted in favor of it and following vocal support for the measure from the public.

Washington Gov. Jay Inslee, who is running for president in the 2020 Democratic primary, and former California state controller Steve Westly were among the climate action advocates who praised the city's decision as part of a growing movement of local governments "[leading] the way in the fight to defeat climate change."

Natural gas is dirty and dangerous. Local governments continue to lead the way in the fight to defeat climate change. https://t.co/lGPyBdICjq — Jay Inslee (@JayInslee) July 19, 2019

Last weekend, Berkeley made an incredible leap toward an electric world by placing a city-wide ban on natural gas in new homes. This is a move many other cities should seriously consider! Natural gas is a substantial contributor to climate change. — Steve Westly (@SteveWestly) July 22, 2019

Berkeley city council member Rigel Robinson noted that the lawmakers voted on the ban just a year after the city declared a climate emergency.

"Many cities would be satisfied or content to just declare a climate emergency." Robinson tweeted. "This is what acting on it looks like."

Just a year after declaring a “climate emergency,” Berkeley becomes the first U.S. city to prohibit natural gas infrastructure in new construction. Many cities would be satisfied or content to just *declare* a climate emergency. This is what acting on it looks like. pic.twitter.com/ZlYr4K8sLP — Rigel Robinson (@RigelRobinson) July 22, 2019

The new ordinance is set to go into effect on January 1, 2020, and will apply to all new multi-unit construction. Some exceptions could be made for first-floor retail spaces, but advocates expect the plan to take a major step away from a large portion of the carbon emissions caused by energy sources in the city.

As Emilie Raguso wrote at Berkeleyside:

The new law would apply only to building types that have been reviewed and analyzed by the California Energy Commission. Each time the state expands its models and analyses, according to the way the ordinance was designed, the city will be able to update its law without returning to council for a new vote.

The city council found that, with the ban in place, electricity used to power heating and cooking systems in homes will be 78 percent carbon free. Currently, natural gas makes up 73 percent of Berkeley's emissions from buildings.

"We have a climate emergency and we know that, at least in Berkeley, natural gas in buildings is responsible for 27 percent of our greenhouse gas emissions," said Councilwoman Kate Harrison, who introduced the plan.

The ordinance "will allow a significant reduction in greenhouse gas-emitting devices and systems," she told the council and community members at last week's meeting.

One of Harrison's aides also demonstrated the use of an electric induction stove to melt chocolate at the meeting.

Here at this week’s Berkeley City Council meeting, staff are melting chocolate with an electric stove. Why? Because tonight, Berkeley will vote whether to become the first city to prohibit natural gas infrastructure in new construction #berkmtg pic.twitter.com/p8IktBwgOI — Rigel Robinson (@RigelRobinson) July 17, 2019

The installation of high-efficiency induction stoves as well as efficient heating and cooling pumps will require new investments, but a report by the Natural Resources Defense Council (NRDC) showed last year that "upfront costs of clean electric heating are generally lower than conventional gas alternatives in new construction, by $1,500 or more."

The NRDC argues that a gradual nationwide shift away from natural gas and toward electricity is possible if the country ends its dependence on coal-powered electricity.

"There's been a lingering perception that burning gas was cleaner than electricity, which might have been true 20 years ago when electricity came from burning coal," said Pierre Delforge, a senior scientist with the organization, told The Guardian. "When we look at electrification policies, we need to think about what the grid will look like in 10 or 20 years, not what it looked like yesterday."

Despite the insistence to the contrary of President Donald Trump and other Republicans, the clean energy sector is fast replacing the coal industry. According to a report by Time magazine in 2017, demand for renewable energy is projected to rise steadily in the coming decades, as it has over the past several years, while demand for coal-powered electricity is on the decline.

Cities that are aiming to reduce their fossil fuel emissions have "just got to think about it in new and creative ways," Bruce Nilles, managing director of the Rocky Mountain Institute, a sustainable energy research firm, told The Guardian. "We're dealing with an existential crisis. We've got to dust off all the different ways that different actors can do good, progressive, climate-minded things."

Energy use in buildings accounts for 25 percent of California's carbon emissions, according to The Guardian. More than 50 cities across the state are considering natural gas bans similar to Berkeley's. San Jose, the state's third largest city, proposed earlier this month a plan that would make 47 percent of its homes powered entirely by electricity.

"You see those changes go to other cities, then go up to the state level and then go to the national level," David Hochschild, California Energy Commission chairman and a Berkeley resident who spoke in favor of the ban at the city council meeting, said. "That's how change happens."