The governor, who had refused to say where he stood on the raises, shifted his public position when he spoke to reporters at the State House.

Meanwhile, opponents learned Wednesday that lawmakers have figured out how to insulate themselves from a potential 2018 ballot repeal effort: Their pay hike package includes raises for judges, and the state Constitution bars any ballot referendum aimed at judicial salaries.

Governor Charlie Baker strongly hinted Wednesday that he would veto the controversial pay raises that legislative leaders are rushing through the House and Senate this week, a gesture that could be futile given the bill’s strong backing from lawmakers.


“In 2014, we said that we didn’t think it was a good idea, and a lot hasn’t happened since then to change our minds,’’ Baker said.

But any objections by Baker could be for naught. His comments came just moments after the House rushed the bill through on a 116-to-44 vote — a comfortable margin in case supporters need a two-thirds majority to override a gubernatorial veto.

The Senate is expected to follow suit Thursday, also with a veto-proof margin, approving the pay package that would hike the salaries of the House and Senate leaders by as much as 40 percent and give big raises to other legislative leaders, judges, and court clerks. It is estimated to cost as much as $18 million annually.

Those veto-proof margins resolve what could have been a tough conflict on Beacon Hill. Baker can now keep his Republican base happy, burnish his fiscally conservative image with the public, and reinforce his role as a brake on legislative excesses.

At the same time, the governor can avoid a nasty spat with Senate President Stanley C. Rosenberg and House Speaker Robert A. DeLeo, two Democratic leaders with whom he has worked closely. Rosenberg and DeLeo are eagerly pushing for the pay package, which would increase their own salaries from $102,500 to $142,500 (not including reconfigured office and travel expenses that could push the total to more than $150,000) as well as raises for dozens of committee chairs, vice chairs, and floor leaders.


The judicial compensation increase appeared, without notice, in the pay raise legislation that the House released late Monday, catching many at the State House by surprise. Judges’ pay had never previously been mentioned as part of the proposal. Judges last got a raise in 2013.

Rosenberg’s office released a statement saying the judges deserved the increases, and his aides denied that the judges’ salary hikes were added to insulate legislative pay increases from a public referendum in the 2018 state election. DeLeo spokesman Seth Gitell said that because judges’ compensation was under discussion, the speaker felt it was “appropriate” to include their raises in the bill.

That maneuver drew the ire of Chip Ford, executive director of Citizens for Limited Taxation, the state’s leading antitax group, which has mounted repeal efforts against legislative pay raises in the past.

“There is not a single trick or scam they haven’t pulled on this thing,’’ said Ford.

“It is just shameless arrogance because they know they can get away with it,’’ he said, noting that public attention has been preoccupied by both the Washington political scene and the New England Patriots’ Super Bowl prospects.

Pam Wilmot, executive director of Common Cause Massachusetts, said her group supports a vigorous debate on compensation adjustment, but she faulted the fast-track process that the Legislature is following.


“We have consistently said, given the controversial nature of this, it should be an open and transparent debate and allow the public to weigh in — that is not happening here,’’ she said.

Legislative leaders have also found a way to circumvent the state’s conflict of law, which bars lawmakers from voting on any bill in which they have a direct financial interest.

The proposed raises are actually increases in the stipends received by dozens of members of the legislative leadership in both the House and Senate, Democrats and Republicans, as committee chairmen or floor leaders. But DeLeo and Rosenberg have held off making those appointments in the newly elected Legislature to allow all the 198 other lawmakers the legal ability to vote for the raises.

A state constitutional amendment, approved by voters in 1998, bars legislators from changing their base legislative salary, which is now set at $62,500 and is adjusted every two years based on the state’s median income. The leadership stipends have not been raised in 33 years.

Frank Phillips can be reached at frank.phillips@globe.com.