Republican Governor Charlie Baker Thursday night said that he will veto nearly $18 million in annual pay raises for top legislators, statewide elected officials, and judges.

"We will veto this legislation," Baker said, "because given the current fiscal outlook for the state, now is not the time to expend additional funds on elected officials’ salaries"

Late last year Baker made modest cuts to the state budget, fearing Massachusetts was heading for a shortfall. Beacon Hill leaders protested, saying they thought the action premature.

Unless something unexpected happens, it seems that both chambers of the Democratically controlled Legislature will easily override Baker's veto.

One indication of legislative resolve is the fact that the controversial bill sailed through the Senate in less than 30 minutes. Senate Democrats pushed through the bill with a 31-to-nine vote. Three Democrats voted against the raises along with the chamber's six Republican.

The day before, The House of Representatives voted 115 in favor and 44 against the raises. Of those 44 'no' votes, House Republicans stood unified against the move and only nine Democrats voted against their own party leaders.

Rosenberg said after the vote that younger lawmakers are choosing to leave the Legislature because the pay is was too low.

"The pay wasn't good enough and also the hours are extremely long and so you have to be able to sort of balance and justify that level of investment of time away from your family and the sacrifices they're making, and they just couldn't make their ends meet," Rosenberg said.

All lawmakers got an automatic raise last year, based by law on the state's median income, of over four percent. That brought the base pay for representatives and senators to $62,547. Committee chairs are paid an extra stipend on top of that base, as are other members of the leadership.

There's a lot in the bill for lawmakers to like. Beyond upping the pay of the two chamber's top leaders, DeLeo and Rosenberg, it increases the office budget for all members. By increasing pay for committee chairs and vice-chairs it adds a potent financial incentive for members to rise through the ranks of leadership.

Baker has said that he and Polito will refuse any raises they're awarded and campaigned against the idea of raises for lawmakers. How other constitutional officers will react was unclear.

"We said in 2014 we didn't think the pay raise made sense at that point in time and I don't see a lot that's changed with respect to that," Baker said at a press conference Wednesday afternoon after introducing his annual budget.