WASHINGTON (CBSNewYork/AP) — Loretta Lynch has won confirmation to serve as the nation’s attorney general, ending months of delay.

The vote was 56-43 in the Senate on Thursday.

READ MORE: Juneteenth 2021: Tri-State Area Events Honoring Liberation Of America's Last Enslaved People

Lynch will replace Eric Holder and become the first black woman in the nation’s top law enforcement post. She currently serves as U.S. attorney for the Eastern District of New York, which covers Brooklyn, Queens, Staten Island and Long Island.

Lynch, 55, boasts strong credentials and a reputation as a no-nonsense prosecutor, but many Republicans opposed her because of her support for President Barack Obama’s executive actions on immigration.

Several New York politicians quickly released statements applauding the confirmation Thursday.

“Ms. Lynch has been a steadfast defender of justice in both civil and criminal cases; I am confident that she will continue to set the standard for excellence and integrity in public service as Attorney General,” Gov. Andrew Cuomo said.

“She will pour every ounce of her energy into keeping America safe, upholding the rule of law, and protecting and restoring voting rights that have been under assault for far too long,” Sen. Charles Schumer said.

“I am pleased to finally be able to congratulate Loretta Lynch on her confirmation as Attorney General of the United States,” Sen. Kirsten Gillibrand said. “Loretta is strong and fearless, and she is an ideal choice to lead the Justice Department.”

Lynch’s confirmation was delayed for months for a variety of reasons, most recently a lengthy dispute over abortion on an unrelated bill to address sex trafficking.

A deal on the abortion issue was reached earlier this week, and the trafficking bill passed unanimously Wednesday.

READ MORE: New York Scaling Back Mass COVID Vaccination Sites, Adding Pop-Ups At Early Voting Locations

Sen. Al Franken, D-Minn., said he was “saddened to see Republicans use the trafficking bill disagreement as an excuse to delay an entirely unrelated vote on Loretta Lynch’s nomination to serve as attorney general.”

“I’m glad that the trafficking bill passed and that Loretta Lynch finally appears headed for confirmation,” Franken said before Thursday’s vote.

Democrats had grown incensed over the long delay in confirming Lynch.

Last week, Obama himself weighed in, saying it was “embarrassing” the way Republican senators delayed Lynch’s confirmation for what he called “political gamesmanship.” Obama said nearly all Republicans agreed that Lynch is qualified to be the nation’s top law officer. Yet he says the five months she’s been waiting is longer than the previous seven attorney general nominees combined. Obama called that “a crazy situation.”

As attorney general, Lynch assumes a portfolio that includes fighting terrorism, preventing cyberattacks and dealing with police and race.

Those are issues strikingly similar to what she’s dealt with as top federal prosecutor for much of New York City.

She will inherit a Justice Department consumed by efforts to stop the flow of Islamic State recruits to Syria and prevent destructive computer crimes against American corporations. And she’ll arrive with the department at the center of a dialogue on relations between police and minority communities.

She’s expected to be sworn in next week.

MORE NEWS: New York Weather: CBS2’s 6/19 Saturday Morning Forecast

(TM and © Copyright 2015 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2015 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)