MAINE VOTERS delivered a shock to Massachusetts on Tuesday, overwhelmingly approving a ballot question that would block the Bay State’s bid to reduce its reliance on fossil fuels by building a 145-mile transmission line delivering hydro-electricity from Quebec.

The ballot fight was the most expensive in Maine history. Opponents of the ballot question heavily outspent supporters and most of the state’s political and media establishment urged a no vote. But with 77 percent of the vote counted Tuesday night, the tally was 59 percent in favor of the question, 41 percent opposed.

The Natural Resources Council of Maine called the victory a landslide. Pete Didisheim, the group’s advocacy director, urged Central Maine Power to halt construction work on the transmission line immediately.

“We also call on Massachusetts to honor this electoral outcome by selecting an alternative option for meeting its climate goals without imposing significant environmental harm on another New England state,” Didisheim said in a statement.

Central Maine Power is likely to challenge the ballot outcome in court, possibly on the grounds that the question attempts to retroactively overturn regulatory approvals on which the utility relied in moving ahead with construction of the power line.

Clean Energy Matters, a political group affiliated with Central Maine Power, issued a statement saying “we believe this referendum, funded by fossil fuel interests, is unconstitutional. With over 400 Maine jobs and our ability to meet our climate goals on the line, this fight will continue.”

The ballot question asked voters if they wanted to ban the construction of high-impact electric transmission lines in the Upper Kennebec region of the state or any other parts of the state. That part of the question was retroactive to 2020. A second part of the question required the legislature to approve by a two-thirds vote any similar project using public land. That part of the question was retroactive to 2014.

Gov. Charlie Baker on Monday objected to the retroactive nature of the question and suggested Maine voters should support the transmission line because of its ability to address climate change. “Truly electrifying big pieces of what is currently a fossil-fuel-based economy isn’t going to work if people aren’t willing to accept transmission capacity to make that happen. You can’t get from here to there without transmission capacity,” he said.

The Maine transmission line is the second attempt by Massachusetts to build a roughly $1 billion power cord to Quebec and its vast hydropower resources, which are considered crucial to Baker’s goal of achieving net zero emissions by 2050. The big advantage of hydropower is its ability to provide a reliable source of electricity around the clock; offshore wind and solar, by contrast, only generate power when the wind is blowing or the sun is shining.

The first attempt to strike a deal with Hydro-Quebec centered on a a transmission line running through New Hampshire’s White Mountains to Quebec, but that project was shut down by Granite State regulators in 2018.

Massachusetts then moved on to the second-place finisher in its bidding contest — a project called New England Clean Energy Connect. The project called for Central Maine Power to build a transmission line carrying the hydro-electricity from the Canadian border to Lewiston, where it would be fed into the regional power grid. The cost of the transmission line, as well as the electricity it would carry, would be paid for with assessments on Massachusetts electric ratepayers.

The project received all the necessary permits, but ran into grassroots opposition that was fanned by a group of energy companies that stood to lose financially if the clean power from Canada made it into the New England power grid. NextEra Energy, which owns an oil-fired power plant in Maine and the nuclear-powered Seabrook Station in New Hampshire, provided a lot of the funding to put the question on the ballot and build support for it.