WASHINGTON -- Loretta Lynch won confirmation as the first black woman U.S. attorney general Thursday from a Senate that forced her to wait more than five months for the title and remained divided to the end.

The 56-43 vote installs Lynch, now U.S. attorney for the Eastern District of New York, at the Justice Department to replace Eric Holder. Holder has served in the job throughout the Obama administration, becoming a lightning rod for conservatives who perceived him as overly political and liberal, and even getting held in contempt of Congress. She is expected to be sworn in next week.

Lynch will inherit a department consumed by efforts to stop the flow of Islamic State recruits to Syria and prevent destructive computer crime against American corporations. And she'll arrive with the department at the centre of dialogue on relations between police and minority communities.

Lynch will have limited time in the twilight of the Obama administration to craft ambitious new policy proposals and is seen as unlikely to depart in radical ways from Holder's priorities. But supporters expect her to bring her own understated and low-key management style, and she sought to assure anxious Republicans in recent months that she would arrive in Washington with her own law-and-order perspective

Lynch, 55, is seen as a no-nonsense prosecutor, and has wide law enforcement support. The issue that tore into her support with Republicans was immigration, and her refusal to denounce President Barack Obama's executive actions limiting deportations for millions of people living illegally in this country. Questioned on the issue at her confirmation hearing in January, she said she believed Obama's actions were reasonable and lawful.

Democrats angrily criticized Republicans for using the issue against her, saying an executive branch nominee could not be expected to disagree strongly with the president who appointed her, but Republicans were unapologetic.

Still, Lynch won the support of 10 Republicans, more than expected in the days heading into the vote.

From the White House, Obama hailed her confirmation.

"Loretta has spent her life fighting for the fair and equal justice that is the foundation of our democracy," he said. "She will bring to bear her experience as a tough, independent and well-respected prosecutor on key, bipartisan priorities like criminal justice reform."

Lynch grew up in Durham, North Carolina, the daughter of an English teacher and a minister. Her father, Lorenzo Lynch, 83, watched from the Senate visitors' gallery Thursday as his daughter won confirmation.

Afterward, he told reporters: "The good guys won. And that's what's been happening in this country all along, even during slavery."

The long delay in confirming Lynch since she was nominated in November incensed Democrats, with Obama himself weighing in last week to lament Senate dysfunction and decry the wait as "crazy" and "embarrassing." There were various reasons for the delay, most recently a lengthy and unexpected impasse over abortion on an unrelated bill to combat sex trafficking that McConnell insisted on finishing before moving to Lynch.

Yet Democrats controlled the Senate when Lynch was nominated last November and could have brought up her nomination for a vote then. They held off with the GOP's encouragement after being routed in the midterm elections and spent the time confirming judges instead.

There was an expectation that Republican leaders would move Lynch's nomination swiftly this year, especially since many Republican members of Congress are eager to be rid of Holder. Instead, the nomination became tangled in the dispute over Obama's executive actions on immigration, and seemed to stall.