BOSTON (AP) — Karen Spilka has taken the gavel as president of the Massachusetts Senate, capping a tumultuous eight-month period for the chamber.

The Ashland Democrat was elected to the powerful leadership post by her colleagues Thursday. She succeeds Worcester Democrat Harriette Chandler, who has led the Senate since former Senate President Stan Rosenberg stepped aside amid an ethics probe in December.

READ MORE: 5 People Rescued After Boat Capsizes Near Lighthouse In Buzzards Bay

State Sen. Karen Spilka. (WBZ-TV)

Spilka announced in May she had secured enough commitments from fellow Democratic senators to become the new president. The transition occurs as lawmakers race against a Tuesday deadline to complete action on major legislation.

READ MORE: Connecticut Man Charged In Hit-And-Run With Tractor-Trailer That Injured Mass. State Police Lieutenant

Spilka, who has served as chair of the Ways and Means Committee, was elected to the House in 2001 and the Senate in 2004. The formal social worker becomes just the third woman to lead the Senate.

MORE NEWS: 'It Means Celebrating Freedom': Communities Across Boston Celebrate 1st Juneteenth As National Holiday

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)