Town Meeting members in Brookline voted Wednesday night to ban oil and gas heating infrastructure in new construction and gut renovations in the town.

The vote passed with an overwhelming majority of 207 to 3, making Brookline the first town in Massachusetts to enact such a ban.

Supporters hope that eliminating fossil fuel infrastructure will help curb climate change.

"When you're in a hole, you stop digging," said Brookline state Rep. Tommy Vitolo. "We must reduce the carbon emissions in our buildings dramatically."

That's not just an aspiration; in Massachusetts, it's the law. By 2050, the state has to reduce climate change emissions by 80% below 1990 levels. About 40% of the state's emissions come from commercial and residential buildings.

Proponents of the proposal hope to speed the transition away from fossil fuels to electricity, which is increasingly generated by renewable resources. Brookline Town Meeting member Jesse Gray, who proposed the ban, estimated it would cut the town's climate change emissions by 15% over the next 30 years.

The town's original proposal banned fossil fuel infrastructure for both heating and cooking. To increase support, proponents modified the measure to permit gas cooking stoves in new buildings and house rehabs.

Town officials say there's been little local opposition to the proposal. But National Grid, which provides natural gas to the town, says it polarizes the policy conversation.

"We disagree that the imperative to decarbonizing the heating sector should be viewed as an absolute prohibition on the continued use of natural gas in the short term," said National Grid spokesperson Danielle Williamson. She added the company's pipeline network has a role to play in a clean energy future, perhaps carrying biogas derived from farm, landfill or human waste.

Brookline Town Meeting member Kathleen Scanlon, one of the backers of the proposal, said constructing more energy-efficient buildings, and the falling price of renewable energy, will ease the transition to a fossil-free future.

"Our research indicates that it's cost neutral and, over time, the operating costs are lower to go with an electric building system," she said.

More than 50 American cities and counties — including Cambridge — have passed similar laws or are considering policies to support all-electric construction.

"My hope is that we'll keep pushing forward," Vitolo said. He also has proposed a bill on Beacon Hill that would require all new state government buildings be built without fossil fuels.