After weeks of controversy, the US Senate is set for a final vote on the confirmation of President Donald Trump's nominee to the Supreme Court, Brett Kavanaugh.

If senators do not change their voting intentions, Judge Kavanaugh will be appointed to the top US court.

The vote is expected at about 17:00 local time (21:00 GMT).

Mr Kavanaugh has been embroiled in a bitter battle to stave off sexual assault allegations.

What's happening in the Senate?
It's actually been in session throughout the night covering the issue, although the debate has taken place in a largely empty chamber.

Senators are expected to be there in force from 15:30 in the lead-up to the vote.

The Senate is split 51-49 in favour of the Republicans and the vote will be largely along party lines. Mr Kavanaugh would actually only need a 50-50 vote, as that would force a tie-breaker in his favour from Vice-President Mike Pence.

So what are the numbers?
It's looking like a 51-49 vote in the judge's favour at the moment, barring last-minute changes of mind. This was the tally in a procedural vote on Friday.

That's because Republican senators who had been wavering on the issue have come down, with one exception, on Mr Kavanaugh's side.

The one exception is Alaska Senator Lisa Murkowski. Although she said Mr Kavanaugh was a "good man", she said he was "not the right person for the court at this time" and his "appearance of impropriety has become unavoidable".

But her "no" vote will be balanced by a "yes" from the only Democrat set to back the nomination.

Senator Joe Manchin is facing a difficult re-election campaign in West Virginia, a traditionally Republican state that Mr Trump won by a landslide.

He told the Senate he "found Judge Kavanaugh to be a qualified jurist" but later faced shouts of "shame" from protesters.

Two Republican waverers, Susan Collins and Jeff Flake, have finally decided to back the judge. Mr Flake has been a frequent critic of Mr Trump but said he would vote yes, barring any major changes in evidence.

Oddly, Ms Murkowski will also separately be counted for a "yes" vote. Under Senate rules she can mark herself as "present" for a senator who is unable to attend. Steve Daines, who would have backed Mr Kavanaugh, will be at his daughter's wedding.

How did the senators come to their decisions?
An FBI inquiry was launched into the sexual assault allegations and other issues after Judge Kavanaugh received initial backing for his nomination in a Senate committee vote last week.

While the investigation has proved politically contentious, the wavering senators decided it had not provided sufficient grounds to oppose Mr Kavanaugh.

Senator Collins said: "We will be ill-served in the long run if we abandon the presumption of innocence and fairness."

What was the FBI inquiry about?
In public testimony last week, Prof Christine Blasey Ford said she had been assaulted by Judge Kavanaugh when they were both teenagers in 1982.

Judge Kavanaugh denied the claim - and allegations that he drank to the point of memory loss at the time - in a feisty confrontation with senators.

Federal agents are believed to have spoken to five witnesses regarding Prof Ford's accusations and another four other witnesses involving a separate accusation by Deborah Ramirez, who said the nominee had exposed himself to her when they were both at Yale University. He denies Ms Ramirez's allegations, too.

Mr Trump and his fellow Republicans said the new FBI report had cleared their nominee. Democratic senators said it had been incomplete.

Why is the court so important?
Basically, it's the final arbiter of US law.

It has the ultimate say on such contentious issues as abortion and gun control.

It has nine judges, all of whom are appointed for life, and the confirmation of Judge Kavanaugh is likely to give it a more conservative hue.

The Democrats are still smarting from the previous Supreme Court appointment. Republicans last year successfully stalled the process, meaning it fell to Mr Trump, not Barack Obama, to nominate the new justice. Mr Trump's choice of Neil Gorsuch strengthened the conservative leaning.

All eyes will now be on November's mid-term elections. Mr Trump will be able to campaign on the back of an important victory, but commentators will be watching closely how the Kavanaugh affair affects women voters.