Image copyright Reuters Image caption Roy Moore speaks at a final campaign rally in Alabama on Monday

President Donald Trump has recorded an automated phone message for a Senate candidate accused of sexual misconduct, on the eve of the election.

The president has thrown his political weight fully behind Republican former Alabama judge Roy Moore, who is vying with Democrat Doug Jones for the seat.

Mr Moore denies claims by several women that he made unwelcome sexual advances, mostly when they were teenagers.

The race remained too close to call in opinion polls.

Why is this vote important?

A win for the Democrats could reduce the power of the Republican party, who currently hold just a two-seat Senate majority, to pass legislation ahead of next year's mid-term Congressional elections.

While it is already difficult to pass legislation in the Senate, losing another seat would be a blow for Mr Trump, as approval must be reached by the majority of voting members.

However a win for Mr Moore would be a victory for the president, who has been very vocal about his support for the Republican candidate.

Mr Trump's relationship with fellow Republicans has been at times tense, with some launching attacks on both his character and his presidency.

Mr Trump has previously blamed his own party for legislative failures.

Tuesday's winner will take the seat held previously by Attorney General Jeff Sessions.

What are the allegations against Moore?

While endorsing Mr Moore, Mr Trump has pointed to the former Alabama supreme court judge's repeated denial of the allegations against him.

One woman alleges Mr Moore molested her when she was 14. Another says he tried to rape her.

At a rally on Monday night, Mr Moore reiterated his denials, again questioning why his accusers had kept quiet for 40 years while he held various political offices.

Speaking alongside Mr Trump's former chief strategist, Steve Bannon, in front of a crowd which chanted the president's slogan "Drain the Swamp", Mr Moore drew heavily from the Bible.

"I want to make America great again with President Trump," he said. "I want America great, but I want America good and she can't be good until we go back to God."

Image copyright Getty Images Image caption Mr Moore's wife, Kayla, defended her husband

Mr Moore was joined at the rally by his wife Kayla who said that separate allegations last week that her husband was anti-Semitic were "fake news".

"One of our attorneys is a Jew, we have very close friends who are Jewish," she said.

Mr Moore's campaign rolled out an audio message earlier on Monday with a recording of Mr Trump telling voters his agenda would be "stopped cold" if Mr Moore lost.

At a rally in Florida on Friday, Mr Trump proclaimed his support for the 70-year-old conservative Christian who served in the Vietnam War.

Fitting end to unpredictable year

Analysis by Anthony Zurcher, BBC News

Democrat Doug Jones is ahead by 10 points. No, Republican Roy Moore has a nine-point lead.

The latest batch of Alabama opinion polls are having a difficult time contending with the idiosyncrasies of a low-turnout, mid-December special election, a scandal-plagued Republican candidate in a deeply conservative state and a Democratic base that, while small, may be intensely motivated.

With so many variables at play, it will be tough to draw conclusions about the results of this election - but that won't deter anyone.

A Jones win would not only be seen as a stern rebuke of President Trump, who has put his name on the line for Moore, it would make Democratic control of the US Senate in 2019 a much more realistic possibility.

If Mr Moore prevails, it'd be a prize for the anti-establishment Steve Bannon faction of the Republican Party and an indication that, when it comes to a seat in the US Senate, ideology matters most for some.

Back when Mr Trump named Senator Jeff Sessions to be attorney general last November, no one imagined all eyes would now be on Alabama. It makes for a fitting end to an entirely unpredictable year, however.

Many other national Republicans, including Senate Majority Leader Mitch McConnell, have distanced themselves from their party's candidate.

Richard Shelby, Alabama's other senator, said on Sunday he could not endorse Mr Moore because he found his accusers "believable" and the state "deserves better".

The Moore team is banking on voters in the Deep South's staunchly conservative heartland refusing to pick a Democrat.

Media playback is unsupported on your device Media caption Roy Moore: How Alabamans are defending the accused judge

In Washington, a Democratic lawmaker has sent a letter to the Senate's sergeant at arms urging that Congress take steps to ensure the safety of teenagers working in the Senate page programme from Mr Moore's "predatory conduct".

"I believe my fears are well founded," wrote Wisconsin Congresswoman Gwen Moore, citing the multiple allegations against Mr Moore.

Mr Moore has kept a low profile in recent days but he said in an interview with The Voice of Alabama Politics on Sunday that he had "never molested anyone" and had been a victim of "ritual defamation".

What about Moore's opponent?

Image copyright Reuters Image caption Democratic candidate Doug Jones accuses Roy Moore of hiding

Mr Jones, a 63-year-old prosecutor, has spent the past week rallying African-Americans and held a series of rallies across the state on Sunday.

On Monday in Birmingham, Mr Jones said the election was "one of the most significant in our state's history" and urged voters to "put our decency... before a political party".

Mr Jones also accused his Republican opponent of hiding.

Former President Barack Obama and ex-Vice-President Joe Biden have recorded robo-calls - telephone messages that can be played at rallies - for Mr Jones.

"This one's serious," Mr Obama said in his call. "You can't sit it out."