WASHINGTON — Judge Brett M. Kavanaugh, whose Supreme Court hearings ripped apart the Senate and roiled the nation, headed for final confirmation to the court after two key undecided senators announced on Friday that they would back him, despite allegations of sexual assault and deep-seated Democratic opposition.

The last-minute announcements by Senator Susan Collins, Republican of Maine, and Joe Manchin III, Democrat of West Virginia, capped an emotional and deeply divisive confirmation process that, in the end, turned as much on questions about Judge Kavanaugh’s honesty, temperament and treatment of women as it did on his jurisprudence. A final vote is expected Saturday afternoon, after senators finish delivering speeches on the nomination on the Senate floor, which began Friday night and were continuing through the morning.

Judge Kavanaugh’s ascent to the nation’s highest court is a huge victory for President Trump, Senate Republicans and their conservative allies, who have mounted a decades-long campaign to remake the Supreme Court in their image. He will replace the court’s swing vote, the retired Justice Anthony M. Kennedy, with a committed conservative who is likely to push the court to the right for decades.

But his path there has been a brutal one, leaving in its wake a nation caught in what Senator Mitch McConnell of Kentucky, the Republican leader, described on Friday as the “crosswinds of anger and fear and partisanship.”