BOSTON (AP) — With a new leadership team taking the helm in the Senate and a new Republican administration moving in down the hall, Massachusetts lawmakers get back to work next week with a state budget shortfall looming as the first pressing challenge of their two-year session.

Democratic Gov. Deval Patrick will swear in the 2015-2016 state Legislature as one of his last official acts before his successor, Charlie Baker, takes the oath of office.

The first order of business for the new Senate will be the election of a president to succeed Plymouth Democrat Therese Murray, who is retiring after being the first woman to lead a legislative chamber in Massachusetts. Poised to succeed her is Senate Majority Leader Stanley Rosenberg, who announced more than a year ago that he had secured the necessary votes from his Democratic colleagues.

There is no indication that has changed, despite a recent controversy surrounding Bryon Hefner, Rosenberg's domestic partner. The Boston Globe reported earlier this month that Hefner, 27, had raised eyebrows by mocking Murray on Twitter and boasting that he would exert influence on legislative affairs.

Rosenberg responded with a letter assuring colleagues that he had "enforced a firewall between my private life and the business of the Senate."

The Amherst Democrat would be the first openly gay leader of a Massachusetts legislative chamber, and the first Jewish one. He would also be the first to hail from western Massachusetts since the early 1970s.

As president, Rosenberg would wield substantial power including the appointment of committee chairs, none more important than a replacement for Senate Ways and Means Committee Chairman Stephen Brewer, who is also retiring after falling short to Rosenberg in his own bid to succeed Murray.

The new chair of the budget-writing panel will immediately become a key player in negotiations to close a deficit for the fiscal year ending July 1 that Patrick's administration has estimated at $329 million, but has been pegged at up to $1 billion by the independent Massachusetts Taxpayers Foundation.

On the House side, the key leadership team is expected to remain in place with Robert DeLeo, a Winthrop Democrat, returning as speaker, a post he has held since 2009. Under a House rule, DeLeo would be entering his final two-year term in the leadership post. Unless that rule is changed, a succession race could soon begin with House Majority Leader Ronald Mariano, D-Quincy, and House Ways and Means Chairman Brian Dempsey, D-Haverhill, among potential contenders.

Rep. Brad Jones, R-North Reading, and Sen. Bruce Tarr, R-Gloucester, are expected to retain their positions as the House and Senate minority leaders, respectively.

Republicans remain heavily outnumbered in both chambers, though they did pick up two seats in the Senate in November, bringing their ranks to six in the 40-member body. Yet Democrats retain a veto-proof majority.

Having served in the cabinets of former Republican Govs. William Weld and Paul Cellucci, Baker is no stranger to Beacon Hill horse trading and has worked cooperatively in the past with veteran lawmakers like Rosenberg and DeLeo.

Baker has promised his own analysis of the budget deficit upon taking office. But the Republican has already ruled out tax hikes or cuts in municipal aid to help close the gap, and is also leaning against dipping into the state's $1.1 billion "rainy day" fund.