Alabama senator Jeff Sessions has been confirmed as the new US attorney general, despite fierce Democratic opposition over his record on civil rights and immigration.
The Senate's virtually party-line 52-47 vote ended weeks of divisive battles over Alabama Republican Mr Sessions, an early supporter of President Donald Trump and one of the upper house's most conservative members.
After the vote was announced, Mr Sessions' Republican colleagues applauded the outcome, as opposed to barely a handful of Democrats.
In a post-vote valedictory speech, Mr Sessions alluded to the bitter partisanship and wished for more unity.
"Denigrating people who disagree with us, I think, is not a healthy trend for our body," he said.
After Mr Trump nominated Mr Sessions, Democrats laid into the senator, casting him as too cosy with Mr Trump and too harsh on immigrants.
They said he would not do enough to protect voting rights of minorities, protections for gays and the legal right of women to obtain an abortion.
And they fear immigrants in the US illegally will not receive due process with Mr Sessions as the top law enforcement officer.
"His 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, said Democratic senator Tim Kaine.
Republicans say Mr Sessions has demonstrated over a long career in public service and two decades in the Senate that he possesses integrity and 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," Senate majority leader Mitch McConnell 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."
Mr Sessions won unanimous backing from Senate Republicans but picked up the support of just one Democrat, Joe Manchin of West Virginia.
Alabama governor Robert Bentley is expected to name a Senate replacement for Mr Sessions as early as Thursday.
The Republican-controlled Senate vote came amid rising tension over delaying tactics by minority Democrats that have left fewer of Mr Trump's picks in place than 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 Republican congressman Tom Price of Georgia, Mr Trump's pick for health secretary.
A final vote on Mr Price could come late on Thursday and success seems certain.
Democrats have solidly opposed Mr Price, a staunch advocate of repealing Mr Obama's health care overhaul and reshaping and scaling back the Medicare and Medicaid programmes that provide health care to older and low-income people.
But they have mostly accused Mr Price, a wealthy former orthopaedic surgeon, of conflicts of interest by acquiring stocks in health care companies and pushing legislation that could help those firms.
They have especially targeted his acquisition of shares in Innate Immunotherapeutics, an Australian biotech firm that has said Mr Price obtained a special insider's deal.
Mr Price, who has said he learned of the opportunity from fellow congressman Chris Collins, of New York, told 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 said.
This week has featured overnight, round-the-clock Senate sessions as Republican leaders are grinding through a thicket of controversial picks.
Epitomising the sharp-edged partisanship surrounding confirmation of Mr Trump's cabinet nominees, Senator Elizabeth Warren was given a rare rebuke on Tuesday for quoting Coretta Scott King, widow of the late civil rights leader Martin Luther King, in her 1986 criticism of Mr Sessions.
Mrs King wrote that as an acting federal prosecutor in Alabama, Mr Sessions used his power to "chill the free exercise of the vote by black citizens".
Mr McConnell said Massachusetts Democrat Ms Warren had run afoul of rules about impugning a fellow senator.
Mr Sessions' nomination to a federal judgeship was rejected 30 years ago by the Senate Judiciary Committee after it was claimed that when he was a federal prosecutor he called a black lawyer "boy" and said organisations like the National Association for the Advancement of Coloured People (NAACP) and the American Civil Liberties Union were un-American.
At his hearing last month, Mr Sessions said he had never harboured racial animus.