When Bill Ferguson arrived in the Maryland Senate at age 27 to represent the city of Baltimore, Senate President Thomas V. Mike Miller Jr. nicknamed him the “baby senator” and seated him in the back row of the chamber.

Nearly nine years later, Ferguson’s Democratic colleagues on Thursday unanimously endorsed him to succeed Miller, who is relinquishing his leadership post after 33 years as he battles Stage 4 cancer. The vote by the 32-member caucus means Ferguson is assured of election to lead the 47-seat Senate when it reconvenes in January and Miller gives up his gavel.

“This is an incredibly humbling experience,” Ferguson said at a news conference. “I look forward to working with the other 46 senators to continue to protect the values of Marylanders across the state.”

A liberal-leaning former teacher who has been a strong voice for increasing education funding and revamping Maryland public schools, Ferguson, 36, will probably shift the Senate to the left, other lawmakers said.

He often speaks of the moral imperative he believes should motivate the legislature to pass laws that would improve life for working-class families and others. Many said they expect Ferguson to frame an upcoming battle with Gov. Larry Hogan (R) over how to fund wide-ranging education recommendations, known as the Kirwan Commission recommendations, in those terms.

“Bill is more from the transformational camp rather than the transactional camp. He’s not just about the deal,” said Sen. Paul G. Pinsky (D-Prince George’s), a veteran senator who backed Ferguson’s candidacy after exploring his own run for the presidency.

He called Ferguson a “policy wonk with political savvy.”

Senate Minority Leader J.B. Jennings (R-Harford) said Ferguson should be wary of moving too far to the left, noting that Maryland is a moderate state.

“I have faith that he’s going to realize that the votes aren’t always there,” Jennings said. “I think they have to realize that as we move forward and push on these issues that all voices need to be heard, and we have to work as a team. President Miller allowed that.”

Miller (D-Calvert), 76, has been a senator for 44 years, leading the chamber since Ronald Reagan was president — and Ferguson was a preschooler.

The transfer of leadership means both generational and regional change for the statehouse; even after nine years in office, Ferguson is still the second-youngest senator. His election will cement a new political era in Annapolis, with the two most powerful posts in the General Assembly held by Baltimore-area lawmakers.

Del. Adrienne A. Jones (D-Baltimore County) was elected House speaker in May, after a bitter battle between two other delegates that divided the House Democratic caucus. Jones, the first African American and first woman to lead either chamber of the General Assembly, succeeded longtime speaker Michael E. Busch, who died in April.

The House speaker and the Senate president wield more influence than any official in Annapolis outside of the governor. For more than a decade, Miller and Busch could advocate directly on behalf of the Washington and Baltimore suburbs they represented.

Now, neither presiding officer will represent the densely populated Washington suburbs, which have relied on Miller to champion hospitals, transportation projects and other expensive infrastructure.

Sen. Melony G. Griffith (D-Prince George’s), said the Senate will ensure that the Washington region “is taken care of” nonetheless.

Ferguson, an attorney, is the vice chairman of the powerful Budget and Taxation Committee. Since joining the legislature in 2011, he has chaired the politically charged Executive Nominations Committee, which vets political appointees, and developed a reputation as a thoughtful lawmaker who can broker compromises.

“There is no one that can replace Mike Miller,” Ferguson said Thursday. “The only way that we will move forward is if we maximize the skills and talent of each of the 47 members of the Maryland Senate, and that is what will happen moving forward.”

Miller said he plans to provide whatever assistance his successor needs or wants. “Everyone needs someone to hold the horses for them,” he said. “I intend to hold the horses, and whatever role the Senate president sets aside for me.”

As for advice, Miller suggests being “open and inclusive. . . . Listen to everybody, Republicans and Democrats. Everybody has a voice, from Garrett County to Worcester County and everywhere in between . . . and everybody has equal access to resources.”

As many as five Democratic senators had considered running for Senate president since Miller announced his health was failing early this year: Ferguson, Pinsky, Guy J. Guzzone (Howard), Nancy J. King (Montgomery) and Douglas J.J. Peters (Prince George’s).

The not-so-quiet campaign intensified in the past several weeks.

In recent days, after Miller’s announcement was scheduled, the election essentially became a two-man race between Ferguson and Peters. Peters dropped out of contention late Wednesday.

After Miller revealed his decision to step down at a closed-door Democratic caucus meeting, the lawmakers voted unanimously for Ferguson to succeed him. Ferguson ran uncontested.

Ferguson was born in Silver Spring and lives in Patterson Park. He works as the director of reform initiatives at the Johns Hopkins University School of Education, according to his legislative biography, and is married with two young children.

He graduated from Davidson College in 2005, majoring in economics and political science, and earned a master’s degree in education from Hopkins and a law degree from the University of Maryland School of Law.