WASHINGTON — Boston Mayor Marty Walsh, a Democrat, was confirmed Monday by the Senate to be the secretary of labor, set to take the reins of an agency that is central to President Biden’s worker-friendly agenda.

Walsh, a friend of the president’s who was a favored candidate of organized labor groups such as the AFL-CIO, is the first labor secretary to come from a union background in nearly 50 years.

He rose to prominence in Boston through the building trades unions after dropping out of college to work in construction. He also served in the Massachusetts House of Representatives.

Walsh’s nomination was relatively uncontroversial. He was approved on a 68-to-29 vote.

During a mostly amicable confirmation hearing, he was asked repeatedly by senators on the Health, Education, Labor and Pensions Committee about disparities for women and people of color on issues such as unemployment during the coronavirus pandemic, on wages and earnings, and on health care.

“We are dealing with a system of systemic racism that we have to continue to address,” Walsh said at the hearing. “It’s not simply just throwing fancy words out there, but in policies, it’s actually doing the work, rolling up our sleeves.”

Walsh, 53, has supported labor policies including the PRO Act, a proposal to update labor laws and give workers more ability to organize at work that the House passed last year. He also has supported efforts to raise the minimum wage.

Walsh will lead a Labor Department navigating a complicated economic and public health crisis, with an estimated 18 million people collecting unemployment benefits and others who have left the workforce since last year. He will oversee agency decisions about the proper level of safety compliance necessary for workplaces during the pandemic. Walsh also will face other challenges that predate the pandemic, such as how to regulate contract and gig work.

Under President Donald Trump, the agency passed rules that exempted a large number of workers from the paid sick leave requirements in the Families First Coronavirus Response Act and issued guidelines for unemployment insurance payouts to gig and self-employed workers that labor advocates and workers considered restrictive.

Its workplace safety division, the Occupational Safety and Health Administration, has drawn ire for doing little to enforce safety standards for workplaces during the early days of the pandemic.

Comments are not available on this story.