WASHINGTON (AP) — The Senate on Wednesday confirmed Sen. Jeff Sessions to be attorney general in the Trump administration despite fierce Democratic opposition to the Alabama Republican over his record on civil rights and immigration.

The 52-47 nearly party-line vote capped weeks of divisive battles over Sessions, an early supporter of President Donald Trump and one of the Senate’s most conservative lawmakers.

Democrats laced into Sessions, casting him as too cozy with Trump and too harsh on immigrants. They asserted he wouldn’t do enough to protect voting rights of minorities, protections for gays and the legal right of women to obtain an abortion. They fear immigrants in the country illegally won’t receive due process with Session as the top law enforcement officer.

“Any attorney general must be able to stand firm for the rule of law even against the powerful executive that nominated him or her. In this administration I believe that independence is even more necessary,” said Sen. Tim Kaine, D-Va. “His (Sessions’) record raises doubts about whether he can be a champion for those who need this office most and it also raises doubts about whether he can curb unlawful overreach” by Trump.

Republicans say Sessions has demonstrated over a long career in public service — and two decades in the Senate — that he possesses integrity, honesty and is committed to justice.

“He’s honest. He’s fair. He’s been a friend to many of us, on both sides of the aisle,” Majority Leader Mitch McConnell, R-Ky., said. “It’s been tough to watch all this good man has been put through in recent weeks. This is a well-qualified colleague with a deep reverence for the law. He believes strongly in the equal application of it to everyone.”

Sessions won unanimous backing from Senate Republicans but picked up the support of just one Democrat, Joe Manchin of West Virginia.

Alabama Gov. Robert Bentley is expected to name a replacement for sessions as early as Thursday. Bentley has named six finalists for the Senate appointment, including state Attorney General Luther Strange and GOP Rep. Robert Aderholt.

Strange is considered a leading candidate for the job since Bentley interviewed potential replacements for state attorney general, according to people close to the process. However, Bentley’s office has said he has not made a decision.

Wednesday’s vote came amid rising tension between Republicans controlling the chamber over delaying tactics by minority Democratic that have left fewer of Trump’s picks in place than President Barack Obama had eight years ago. Democrats no longer have filibuster power over Cabinet picks, however, after changing Senate rules when they controlled the chamber in 2013.

Next up for the Senate is Rep. Tom Price, R-Ga., Trump’s pick for health secretary. A final vote on Price could come late Thursday and success seemed certain.

Democrats have solidly opposed Price, a staunch advocate of repealing Obama’s health care overhaul and reshaping and scaling back the Medicare and Medicaid programs that provide health care to older and low-income people.

But they’ve mostly accused Price, a wealthy former orthopedic surgeon, of conflicts of interest by acquiring stocks in health care companies and pushing legislation that could help those firms.

They’ve especially targeted his acquisition of shares in Innate Immunotherapeutics, an Australian biotech firm that’s said Price got a special insider’s deal. Price, who has said he learned of the opportunity from a fellow lawmaker, Rep. Chris Collins, R-N.Y., had testified to Congress that the shares were available to all investors.

“If I were a prosecutor, I’d say this case has real potential,” Senate Minority Leader Chuck Schumer, D-N.Y., said Wednesday.

This week has featured overnight, round-the-clock Senate sessions as GOP leaders are grinding through a thicket of controversial picks.

Epitomizing the sharp-edged partisanship surrounding confirmation of Trump’s Cabinet nominees, Sen. Elizabeth Warren was given a rare rebuke Tuesday evening for quoting Coretta Scott King, widow of the late civil rights leader Martin Luther King Jr., in her 1986 criticism of Sessions.

King wrote that as an acting federal prosecutor in Alabama, Sessions used his power to “chill the free exercise of the vote by black citizens.”

McConnell held that the Massachusetts Democrat had run afoul of rules about impugning a fellow senator.

Sessions’ nomination to a federal judgeship was rejected three decades ago by the Senate Judiciary Committee after it was alleged that as a federal prosecutor he had called a black attorney “boy” and had said organizations like the NAACP and the American Civil Liberties Union were un-American.

At his hearing last month, Sessions said he had never harbored racial animus, saying he had been falsely caricatured.

___

Associated Press writer Kimberly Chandler in Montgomery, Alabama, contributed to this report.