Mike Miller, the president of the Maryland Senate, will step down from his role amid a battle with cancer, he announced Thursday.

Miller, 76, has served for 44 years and led the chamber since 1987, the longest-serving Senate president in the country. During his tenure, he presided over major decisions such as ending the death penalty and legalizing same-sex marriage. Sen. Bill Ferguson, who is four decades younger, is set to succeed him.

This is the second major leadership change in Annapolis this year. In April, Speaker Michael Busch — a Democrat from Anne Arundel who had served since 2003 — died during his term.

Ferguson (D-Baltimore City) will lead alongside new House Speaker Adrienne Jones (D-Baltimore County) — meaning the two highest positions in the Maryland General Assembly will be held by Baltimore lawmakers.

Ferguson, 36, was first elected in 2010. A former Teach for America instructor, Ferguson has been a strong voice in urging Gov. Larry Hogan to increase public school funding. He also previously served as vice chairman of the Budget and Taxation committee.

“If Governor agrees that schools are underperforming, and agrees that inequality in outcomes for kids exists, then propose an alternative,” Ferguson wrote on Twitter earlier this year. “We deserve better.”

Miller graduated from the University of Maryland in 1964. He will continue in his role as senator, representing parts of Calvert, Charles and Prince George’s counties, he said Thursday.

“It’s been a great run. I’ve enjoyed every minute of it,” Miller said Thursday.