WITH BOTH BRANCHES of the Legislature approving climate change legislation by veto-proof majorities, the Baker administration on Thursday declared victory and signaled that the governor will sign the bill into law.

“The governor and I are very pleased the Legislature adopted the vast majority of our amendments,” said Katie Theoharides, the governor’s secretary of energy and environmental affairs.

She said she couldn’t definitively say the governor will sign the bill until it actually reaches his desk and he can see it in its final form, but she signaled that was likely. “We are very pleased by the inclusion of key amendments as well as technical changes,” she said.

Baker has little running room on the climate change bill. His only options are to sign the bill into law or veto it, and vetoing it would trigger overrides in the overwhelmingly Democratic Legislature that could hurt him politically.

Baker “reluctantly” vetoed the climate change legislation passed by the Legislature at the end of the last session, saying he was boxed in by the calendar, which allowed him to only veto it or sign it into law because the bill reached his desk after the Legislature had adjourned. The Legislature responded by passing the exact same bill again in the current session; Baker sent it back in February with a series of amendments.

Between the original veto message and the filing of the amendments, Baker’s tone changed dramatically. In the veto message, Baker was defiant and dismissive, insisting the Legislature’s goal of reducing emissions in 2030 50 percent below 1990 levels was too radical and would end up unnecessarily costing Massachusetts residents an extra $6 billion. He also objected to binding interim emission goals for six industry subsectors and raised questions about a proposed municipal energy code and a series of other provisions.

When he sent the bill back with amendments in February, Baker dropped his objections to some provisions and sought to compromise on others. On the 50 percent emissions reduction goal, for example, Baker suggested a target of somewhere between 45 and 50 percent with the administration setting the final goal. He also urged that goals for industry subsectors be used as planning tools rather than binding requirements.

The Senate passed a revised bill on Monday by a 39-1 margin and the House passed it 146-13 on Thursday. Sen. Michael Barrett of Lexington, the Senate’s point person on climate change, said the bill reflected a number of technical changes sought by the governor but didn’t budge on the major provisions in the Legislature’s original bill.

Theoharides said after the House vote Thursday afternoon that the Legislature had accepted 42 of the 47 amendments proposed by the administration.

“The governor and I are very pleased the Legislature adopted the vast majority of our amendments,” she said.

Theoharides said the administration had four major concerns with the bill. She said significant gains were made in addressing administration concerns about a net zero municipal building code, emission targets for industry subsectors, and language dealing with environmental justice.

On the emission targets for industry subsectors, she said the Legislature compromised, agreeing to allow a subsector to miss its target if the overall emissions target for the state is achieved. She said the building code provision was tweaked to allow for the production of affordable housing and provide a clear process for developing the code. And she said the environmental justice provision was amended to allow the Department of Environmental Protection to review the environmental impact of a specific project by looking beyond the project itself and taking into account its pollution impact using a broader historical and geographical context.

She said the one area where the Legislature did not budge was on the 50 percent emissions reduction target.

“That’s fine. We got three out of four. I don’t want to split hairs over math here, but the math is in our favor,” she said.

Barrett did quibble about the math. He said the administration initially didn’t want net zero mentioned in the bill in connection with the municipal building code but that provision remains and has even been strengthened to include the development of building performance standards for buildings themselves and their heating systems. “We’re doubling down on net zero,” he said.

As for the administration’s previous concerns about the high cost of the 50 percent emissions reduction target for 2030, Theoharides did not repeat the earlier concerns about an extra $6 billion cost. She said the administration will seek to reach the target.

“The changes in the details of this legislation, in addition to the early signs from the federal government, allow us to achieve something more ambitious while continuing to pursue most cost-effective strategies to reduce emissions,” Theoharides said. She said reaching the 50 percent goal “will cost more, but we will need to innovate our way there to make sure that we’re reducing and keeping costs low for residents as we pursue a more ambitious goal.”