WASHINGTON—Judge Brett Kavanaugh’s nomination to the Supreme Court was all but secured on Friday when Sen. Susan Collins declared her support on the Senate floor, capping a tumultuous 13-week battle that was stirred in recent weeks by allegations of sexual misconduct and raw emotion in both parties.

The day unfolded with slow suspense, after Judge Kavanaugh cleared a key procedural hurdle in a 51-49 vote, but the handful of undecided senators announced their final stances one at a time over the course of the afternoon. By late afternoon, it was clear Judge Kavanaugh would win the simple majority needed for confirmation. That sets up a final vote in the Senate on Saturday on a nomination that would cement a 5-4 conservative majority on the Supreme Court.

Judge Kavanaugh could join the court as early as Tuesday, when the high court is to hear two cases involving sentencing rules under the Armed Career Criminal Act.

Friday’s vote marked the winding down of a brutally partisan fight in the Senate with only a month before midterm elections. The already intense battle over whether President Donald Trump would be able to tip the court further to the right was fueled by the explosive allegations of sexual misconduct in recent weeks, and a disagreement over the extent of a further Federal Bureau of Investigation probe that was pushed by wavering GOP senators late last week.

Ms. Collins, of Maine, the last undecided Republican senator, delivered the key 50th vote for the judge. Later, Sen. Joe Manchin of West Virginia said that he, too, would vote in favor of the nominee, the sole Democrat to do so.