Media playback is unsupported on your device Media caption Roy Moore's skittish escape on horseback

The polls have closed in Alabama, where a firebrand Republican conservative is battling for a Senate seat against a Democrat hoping for a huge upset.

President Donald Trump's populist brand will be tested after he backed Roy Moore, who denies allegations of sexual misconduct with teenage girls.

Much of the Republican establishment has distanced itself from the 70-year-old former Alabama judge.

The race between Mr Moore and Democrat Doug Jones is too close to call.

The Republican candidate has said homosexual activity should be illegal and argued against removing segregationist language from the state constitution.

But it is sexual abuse claims against him by a number of women, some when they were teenagers, that have made Washington conservatives baulk.

One accuser alleges Mr Moore molested her when she was 14.

The scandal has put an Alabama Senate seat within reach of Democrats for the first time in more than two decades.

Repercussions beyond Alabama

Gary O'Donoghue, BBC News, Montgomery

Elections are rarely competitive in Alabama. It's the kind of place Republicans might as well weigh their votes rather than count them, such is the party's dominance here.

This special election has upended all the normal expectations and still, at this late stage, remains too close to call.

Democrat Doug Jones can win if he manages to galvanise the black vote in cities such as Birmingham and Montgomery.

Roy Moore, his Republican rival, could easily lose if those rural, white, church-going conservatives stay at home amid the allegations against him.

Whatever the outcome, the repercussions will be felt beyond Alabama.

If the Republicans lose, their Senate advantage contracts to just one vote.

If they win, their candidate is likely to face months of ethics inquiries, and an outside chance of being expelled from the Senate.

For the Democrats, a win would bolster their bargaining power in Congress, and place control of the Senate within definite grasp at next year's mid-term elections.

Skip Twitter post by @realDonaldTrump The people of Alabama will do the right thing. Doug Jones is Pro-Abortion, weak on Crime, Military and Illegal Immigration, Bad for Gun Owners and Veterans and against the WALL. Jones is a Pelosi/Schumer Puppet. Roy Moore will always vote with us. VOTE ROY MOORE! — Donald J. Trump (@realDonaldTrump) December 12, 2017 Report

How does Moore respond?

On Tuesday, the world's press were waiting as he emerged on horseback from woodland to a ballot station.

He said people should "go out and vote their conscience".

Making his final pitch on election eve, Mr Moore reiterated his denials, again questioning why his accusers had kept quiet for 40 years while he had held various political offices.

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

Media playback is unsupported on your device Media caption Kayla Moore: "One of our attorneys is a Jew"

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

Mr Moore was joined at Monday's rally by his wife Kayla, who said 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.

How has Washington reacted?

In an automated phone message on Monday, Mr Trump's voice warned voters that his agenda would be "stopped cold" if Mr Moore lost.

But many other leading Republicans, including Senate Majority Leader Mitch McConnell, have kept arm's length from their party's candidate, or shunned him altogether.

Without mentioning Mr Moore by name, Republican former Secretary of State Condoleezza Rice, an African-American who grew up in Alabama, urged her home state to "reject bigotry, sexism, and intolerance".

Richard Shelby, Alabama's other senator, said on Sunday the state "deserves better" than Mr Moore.

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

A Democratic lawmaker has sent a letter to the Senate urging steps to protect teenagers working in the chamber's page programme from Mr Moore's "predatory conduct".

Who is Moore's opponent?

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

Mr Jones, a 63-year-old former prosecutor, denies opponents' claims he will be a "puppet" of the Democratic congressional leadership.

He is lauded for helping convict two Ku Klux Klan members who bombed a black church in 1963 in Birmingham, killing four girls.

But Mr Jones' support for abortion rights is toxic to many Christian conservatives in Alabama.

After casting his ballot on Tuesday morning, he predicted: "I don't think Roy Moore is going to win this election."

Former President Barack Obama has recorded an automated phone message for Mr Jones.

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