In this Jan. 8, 2021, file photo President-elect Joe Biden's nominee for Secretary of Labor, Boston Mayor Marty Walsh, speaks during an event at The Queen theater in Wilmington, Delaware. Credit: Susan Walsh / AP

BOSTON — Boston Mayor Marty Walsh painted a picture of a city battered by the pandemic, but also resilient and prepared to emerge stronger as he delivered what is likely his last State of the City address Tuesday and looked ahead to joining President Joe Biden’s administration as labor secretary.

Walsh — who has served as Boston’s 54th mayor since 2014 — said he’s been in contact with City Council President Kim Janey, a fellow Democrat who is expected to assume the role of acting mayor when Walsh officially departs.

Janey would become the first woman and first person of color to lead New England’s largest city. Janey, who was elected in 2017 and became council president last year, is Black.

“I have spoken with Councilor Janey, and we have begun the transition,” Walsh said in prepared remarks. “I am confident that the operations of city government, including our COVID response, will continue smoothly.”

Throughout the speech, Walsh highlighted many of the unprecedented challenges the city faced in 2020 brought on by the pandemic.

The fact that Walsh was delivering the speech from the sparse confines of a neighborhood branch library as opposed to last year’s venue — a packed Symphony Hall —was just once testament to the radical changes the city has observed, along with the rest of the country.

“As mayor, I made decisions I never thought I’d have to make: to close schools; pause construction; turn our convention center into a field hospital; and cancel the Boston Marathon for the first time in its history,” Walsh said.

Walsh, 53, is a former state lawmaker with a long history with organized labor. He’s a former head of the Boston Building Trades — a union umbrella organization.

Walsh’s departure will spark a scramble to fill his seat. The mayoral election is in November. Two candidates — Democratic city councilors Michelle Wu and Andrea Campbell — have already announced their candidacies.

Walsh struck a wistful note as he reflected on his years as mayor.

“I believe in Boston. This is the city that welcomed my immigrant parents. This is the city that picked me up when I needed a second chance,” Walsh said. “The truth is, I’m not going to Washington alone. I’m bringing Boston with me. This city is not just my hometown, it’s my heart.”