Robert DeLeo plans to resign Tuesday from the Massachusetts Legislature, after 30 years on Beacon Hill, ending a 12-year run as speaker of the House, during which he oversaw the legalization of casino gambling and passage of landmark health care, gun control and criminal justice reform laws.

DeLeo, 70, announced Monday that he would step down as speaker and resign from the House effective at 6 p.m. Tuesday, concluding weeks of speculation over his future as it became clear that the Democratic leader was approaching the end of his legislative career.

While it's not entirely certain what's next for DeLeo, the longtime legislator confirmed over a week ago that he was talking with Northeastern University about a possible position at his alma mater in Boston, and those negotiations continue, according to his lawyer and the university.

The Winthrop Democrat became the longest-serving speaker in Massachusetts history this year, punctuating a run book-ended by crises that began in the depths of the worldwide financial collapse in 2009 and wraps up in the middle of the COVID-19 pandemic.

The speaker plans to deliver farewell remarks in the House this afternoon, and a Democratic caucus has been scheduled for noon Wednesday, where the majority party will select its new leader.

Majority Leader Ron Mariano, 74, is the only candidate for the speakership, after Rep. Russell Holmes said Monday he no longer would seek the post. The Quincy Democrat is in position to take over for a man who entered the House the same year he did, in 1991, and with whom he has worked hand in hand in recent years.

Mariano, in a statement, said he looked forward to celebrating DeLeo's "impressive list of accomplishments" Tuesday, and on keeping the House focused on its end-of-session work.

"I will be a candidate for Speaker at this week's Democratic Caucus and I am confident that my colleagues will elect me to lead the House through the remaining days of session. We have a lot of work to do overriding budget vetoes and completing conference committee negotiations. I am focused on seeing that work continue uninterrupted," Mariano said.

Holmes, a Mattapan Democrat, said he decided to end his candidacy after talking with many of his colleagues over the past two weeks, including a conversation he had with Mariano on Wednesday evening, before the Christmas break.

"For whatever different reasons, folks were clearly with Ron, and it made sense for me to not be a sore loser and throw mud into the process just because I could," Holmes said. "Folks heard my perspective. It was laid in front of the members and they've decided they want to move forward with Ron, and I have to respect that."

'Dial down the temperature'

While Holmes has criticized the House as an institution for being structurally racist, he said the final passage of the policing accountability bill last week and a conversation he had with Rep. Angelo Scaccia after the death of Scaccia's wife put his speakership bid into perspective.

"I felt I could dial down the temperature in the room," Holmes said. "You can know for a fact that I will still be fighting for the exact same things, because this is not about who the speaker is, it's about having a building that's more transparent, more fair and more equitable for people and women and color."

DeLeo's letter of resignation was read on the House floor by the clerk not long after the House voted narrowly Monday to override Gov. Charlie Baker's veto of an expansion of abortion access in Massachusetts.

"This House has consistently led the way and provided solutions to some of the most complex and challenging public policy problems of our time. It is a comfort for me to know that, through our joint efforts, when I leave I do so with the knowledge that the House is well positioned for continued success," DeLeo wrote.

DeLeo had indicated before Christmas that he had entered into negotiations with Northeastern University for future employment, though his letter did not specify whether he had agreed to take a job.

A spokeswoman for Northeastern said, "Pending ongoing conversations, we are looking forward to welcoming Speaker DeLeo back to his alma mater."

DeLeo said this session that he planned to seek reelection and reelection as speaker, but his sudden departure, after his Nov. 3 reelection, means a special election will need to be held to fill his seat.

Over the years, DeLeo carved out a reputation as a moderate, consensus builder who rarely put legislation on the floor that didn't have the backing of nearly his entire caucus.

While he was seen by the more liberal wing of the party as a pro-business Democrat who slowed down the pace of change, like movement toward a $15 minimum wage, he also spearheaded an increase in the sales tax from 5 percent to 6.25 percent and asked his members twice to increase the gas tax to pay for transportation.

No cloud of suspicion

To some, DeLeo was an approachable and jovial leader, as interested in talking about the Red Sox or college hockey as inside-building politics. But, to others, DeLeo led with a tight grip was known to punish legislators, including Holmes, if they stepped out of line.

As he departs, DeLeo will become the first in a line of four speakers to not leave under a cloud of suspicion or legal trouble. Though he was named by prosecutors earlier in his speakership as an "unindicted co-conspirator" in a patronage hiring scandal at the Probation Department, the subsequent dismissal of convictions in that case put the accusations in a different light.

"It has been an honor to work with him to improve the lives of our residents, families, and communities, and help our businesses throughout the Commonwealth. I know the Speaker has definitely made his mark on our state, and the impact of his work will be felt for years to come," said Senate President Karen Spilka.

Spilka, who served in the House with DeLeo for four years before he became speaker, is the fourth Senate president DeLeo has worked with since he took the top job.

Baker said he appreciated DeLeo's "work ethic and his sense of balance."

"He put in the time, and on many issues — gun control, domestic violence, child welfare, wage parity, transportation, education, criminal justice and police reform — he worked hard to find common ground among competing voices," Baker said in a statement. "That focus on deliberation and discussion made the end result better, and has created a positive, lasting legacy across state government.

Baker continued, "Even though we had our fair share of disagreements, he always heard me out, and I will always be grateful for the courtesy he and his leadership team showed our Cabinet Secretaries and Commissioners."

With many lawmakers participating remotely in a House session Monday, some went on Twitter to congratulate DeLeo.

Rep. Tommy Vitolo, a Newton Democrat, said he only got to work with DeLeo for two years.

"In that short time, I got to know a deeply caring, joyful, effective leader," Vitolo wrote.

Rep. William "Smitty" Pignatelli, D-Lenox, the House chairman of the Environment, Natural Resources and Agriculture Committee, also thanked DeLeo.

"The 4th Berkshire District wishes you all the best in the next chapter. The @MAStateHouse is well positioned because of your commitment and steady hand," Pignatelli said.