THE HOUSE AND SENATE on Thursday overrode Gov. Charlie Baker’s veto of legislation authorizing big salary increases for lawmakers, constitutional officers, and judges. The Senate also sweetened the pay hike for its members by approving a rule that allows each senator to take stipends for up to three leadership positions; the House limited its members to just one stipend.

Adjustments in base salary for the Legislature can only be done through a constitutional process approved by voters two decades ago, so lawmakers decided instead to approve stipends for themselves, the constitutional officers, and judges. By including a pay hike for judges in the package, the legislation is not subject to repeal at the ballot.

An opinion issued by the Ethics Commission held that it was not a conflict of interest for lawmakers to raise their own pay because the legislation was general in nature; all the legislators had to do was file a disclosure with the commission indicating they would be voting on a measure that would increase their pay.

Senate President Stanley Rosenberg met with reporters after his chamber’s vote and insisted the process was “very transparent” even though there was no public hearing on the legislation, which first surfaced publicly last week. Rosenberg said the pay raise issue had been thoroughly vetted by studies in 2008 and again in 2014. He said the time for action was long overdue.

“The stipends have been frozen for 35 years,” he said. “The Legislature has waited 35 years to do this out of an abundance of caution and respect to the voters.”

Pressed on whether it was a conflict of interest for him and other lawmakers to approve their own raises, he insisted it was not. “Not according to the Ethics Commission,” he said. “There is no one else to vote on these stipends.”

The pay raise legislation authorizes stipends of $80,000 for House Speaker Robert DeLeo and Senate President Stanley Rosenberg, on top of their base pay of $62,547. The chairs of the House and Senate Ways and Means Committees will receive stipends of $65,000. Other top leadership positions in the House and Senate will receive slightly lesser amounts. Committee chairs and vice chairs, who previously received stipends ranging from $7,500 to $15,000, will now be paid $15,000 to $35,000.

In addition, the legislation eliminates the controversial per diem payments and instead allows a $15,000 expense stipend for lawmakers who live within 50 miles of the State House and $20,000 for those who live beyond that distance. The expense payments do not require documentation.

Under a little-noticed provision in the legislation, lawmakers can collect stipends for as many as two positions. The House on Thursday passed a rules package that limited its members to just one stipend, while the Senate rules package allowed that branch’s members to pocket as many as three. The Senate, with just 40 members, often has members serving in multiple leadership positions.

“It’s up to 3 stipends,” said Rosenberg. “Some people will have two positions. Some will have three. Some will have one. Actually, I don’t expect anyone will have one, everyone will have two or three.”

Sen. Mark Montigny of New Bedford, who crafted the Senate rules package, held three leadership positions last year for which he was paid a $15,000 stipend on top of his base salary. If he retains those same three positions this year, his stipend could increase to $80,000, bringing his total salary-and-stipend compensation to $142, 547, the same level as the Senate president.

Sen. Bruce Tarr of Gloucester, who will receive a $60,000 stipend under the legislation as minority leader, withdrew an amendment to the Senate rules that would have limited senators to just two stipends.

Asked why he withdrew his amendment, Tarr said: “Because it didn’t have support and it’s something I want to come back and revisit.”

When it was pointed out that he filed many amendments throughout the rules debate that were overwhelmingly dismissed by the Senate, Tarr said: “Sometimes you have to think about the things you’re going to do in the future as opposed to making a stand today.”

Tarr said the larger issue is whether the pay raise was justified at all. He and other Republicans in the Senate, along with three Democrats, voted to sustain the governor’s veto of the legislation. The override vote in the Senate was 31-9; the House vote was 116-43.

Baker and Lt. Gov. Karyn Polito have said they won’t accept stipends raising their pay to $185,000 and $165,000, respectively, as well as a $65,000 housing allowance for the governor.

Kirsten Hughes, the chairman of the state Republican Party, issued a statement slamming Attorney General Maura Healey, Treasurer Deborah Goldberg, and Secretary of State William Galvin for failing to say prior to Thursday’s vote whether they would accept increases ranging from $30,000 to $45,000.  “Massachusetts Democrats won’t be getting a profile in courage award anytime soon thanks to the underhanded, backdoor nature of this pay raise scheme,” Hughes said.

Yet Tarr, who emerged from the Senate through a side door after the pay raise vote, was also refusing to say whether he would accept his stipend.  “I’m trying to figure out what I’m going to do with respect to that,” he said, noting he was considering his options. Asked what those options were beyond accepting or rejecting the pay hike, he said: “We’ll talk about it when the time is appropriate.”