The Senate voted Thursday to confirm Loretta Lynch as President Barack Obama's next attorney general.
With a confirming vote of 56 "yea" to 43 "nay," Lynch will become the first black woman to become the top U.S. law enforcement official.
She had awaited confirmation since November when Obama, a fellow Harvard Law School graduate, nominated her to replace Eric Holder. He was expected to step aside early next week so Lynch can take over as head of the U.S. Justice Department.
Despite the delay, Lynch was widely seen as less controversial than Holder, who often clashed with Republicans. She has said she aims to smooth relations with Congress.
Among those Republican senators supporting Lynch were Senate Majority Leader Mitch McConnell of Kentucky, Sen. Lindsey Graham of South Carolina and Sen. Orrin Hatch of Utah.
Despite speaking against her on the floor earlier Thursday, GOP presidential hopeful Sen. Ted Cruz of Texas did not vote on Lynch's confirmation.
In a statement issued after the vote, Holder congratulated Lynch on her confirmation and said he is "confident that Loretta will be an outstanding Attorney General, a dedicated guardian of the Constitution, and a devoted champion of all those whom the law protects and empowers."
As attorney general, Lynch's earliest tests would likely include handling civil rights cases stemming from deadly altercations between police and unarmed black men in several U.S. cities. The Justice Department has said it will look into bringing civil rights charges over the death of a Baltimore man who died after sustaining a spinal cord injury while in police custody.
Lynch would also inherit major financial cases involving allegations that some of the world's largest banks manipulated the currency markets and the Libor benchmark interest rate.
Her nomination was backed by the Senate's Judiciary Committee by a vote of 12-8 on Feb. 26. But her confirmation has languished over an impasse in the Republican-led Senate on an unrelated bill meant to protect human trafficking victims. Democrats had balked at an anti-abortion provision included in the human trafficking bill, but that dispute was settled on Tuesday and the bill was approved on Wednesday.
An accomplished career prosecutor, Lynch has twice served as U.S. attorney in Brooklyn, New York, most recently since 2010. Her office there handled more terrorism prosecutions than most other offices in the United States. For two years, she also has led a committee that advised the attorney general on policy.
—CNBC's Pat Anastasi and Reuters contributed to this report.