Margaret R. Guzman, a former public defender, will be the first Hispanic judge to sit on the federal U.S. District Court for Massachusetts.

The U.S. Senate voted 49-48 Thursday to confirm Guzman, a state court judge, to the seat. Vice President Kamala Harris broke the tie vote which split along party lines. Senator Mitt Romney, a Republican and former governor of Massachusetts, voted against the nomination.

Guzman, who was nominated to the federal bench byPresident Biden last July, is a graduate of Clark University in Worcester, and the Boston University School of Law.

She previously worked for the Committee for Public Counsel Services in Worcester from 1992 until 2005. Guzman went entered general law independent practice in 2005, working until her 2009 nomination to the Massachusetts Trial Court by then-Governor Deval Patrick.

As an Associate Justice from 2009 to 2017, Guzman presided over criminal and civil matters in half of the state’s District Courts. She has served as the first justice for the Ayer District Court since 2017.

In floor remarks before the vote, Senator Ed Markey pointed to Guzman’s varied legal experience.

“Judge Guzman will therefore bring to the federal bench not only the knowledge and experience of a state court judge who has presided over more than 1000 cases in her career that have gone to judgment, but the wisdom of a public defender and solo practitioner, joining together precisely the kind of professional legal diversity that the Biden administration has made a priority and that the federal judiciary badly needs,” Markey said.

Carl Tobias, Williams Chair in Law at the University of Richmond said Guzman’s confirmation represents “a perfect example” of the Biden administration’s effort to diversify the federal courts.

“That is unusual and that’s not a typical profile that you would’ve seen historically,” Tobias said when asked about Guzman’s work history.

Ultimately, Tobias added, experiential diversity – the types of legal practice a nominee has engaged in – add positively to a court’s expertise.

“You want a federal judiciary that reflect the people who come into court,” he said. “I think she, by virtue of her own experience, but also the people she’s represented, will have a better sense than many judge would have of the types of people who will be in her federal court room.”

Other elected officials, including Senator Elizabeth Warren, praised Guzman’s confirmation.

“Judge Guzman has an exceptional understanding of our entire justice system with roots in the Worcester legal community as a public defender and deep expertise as a Massachusetts trial court judge – and today, she is making history as the first Hispanic judge to serve on the District Court in Massachusetts,” Warren said in a statement.

Judge Guzman deferred requests for comment Wednesday to the White House.