Image copyright Reuters Image caption Roy Moore's victory is likely to send shockwaves through Washington

US President Donald Trump's pick for Alabama's Senate race has lost the state's Republican primary to a firebrand Christian conservative.

Incumbent Luther Strange, 64, said he had called rival Roy Moore to concede the race.

"We wish him the best as he goes forward," he told supporters.

Mr Moore is a populist former chief justice in the state, who rode to the voting booth on a horse named Sassy, and brandished a gun at a rally.

The news is likely to rattle Washington Republicans, including President Trump, who had confidently pitted Mr Strange against the party's anti-establishment wing.

Mr Trump and Vice-President Mike Pence have both appeared with Mr Strange at rallies, while a political group linked to top Senate Republican Mitch McConnell is said to have spent nearly $9m (£6.7m) on his behalf.

Image copyright AFP/Getty Images Image caption The president himself flew in to Alabama to offer his endorsement to Mr Strange

Image copyright Getty Images Image caption Vice-President Mike Pence (R) campaigned for the incumbent senator just days before his poll defeat

The Senate seat was held by Jeff Sessions until February, when Mr Trump picked him to serve as US attorney general.

The president made his allegiance clear on 24 September, tweeting: "It was great being with Luther Strange last night in Alabama. What great people, what a crowd! Vote Luther on Tuesday."

But within minutes of the result, he had thrown his weight behind the winning Republican candidate.

Mr Moore, 70, is best known for losing his position as the state's top judge twice. The first time, he had flouted a court order to remove a Ten Commandments monument from the courthouse.

When the people of Alabama elected him to the court again, he was suspended a second time for defying the US Supreme Court's 2015 ruling legalising gay marriage.

Alabama has not elected a Democrat to the Senate in a quarter of a century, so Mr Moore is expected to beat his Democratic rival Doug Jones when they face off in a vote on 12 December.

Mr Moore had threatened to upend the Republican Party if he won the nomination and branded his opponent an "establishment lackey".

Media playback is unsupported on your device Media caption Meet the outsider who made Trump eat his words

The bible-quoting evangelical drew support from Christian conservative Sarah Palin - and recently-fired White House chief strategist Steve Bannon.

Mr Bannon, the architect of President Trump's "America First" agenda, said on Monday that Republican elites think Alabama voters are just "a pack of morons" who will vote as they are instructed to.

"You're going to see in state after state people that follow the model of Judge Roy Moore, that do not need to raise money from the elites," he declared at Mr Moore's victory party.

Image copyright Getty Images Image caption Mr Moore said of the vote: "God has put me in this election at this time, and all the nation is watching."

Though voters rejected his candidate of choice, President Trump remains popular in Alabama, which he won by 28 points last year.

The new Republican nominee insists he is among the president's fans.

"Don't let anybody in the press think that because he supported my opponent I do not support him and support his agenda," Mr Moore said after winning.

Analysis: A jolt for the GOP leadership

By Anthony Zurcher, BBC North America reporter

On Friday night, Mr Trump expressed his doubts about whether he was doing the right thing by coming down to Alabama to push for Mr Strange.

He said he "might have made a mistake" and fretted that if Mr Strange were to lose on Tuesday, the media would say the president had failed to "pull his candidate across the line".

If the president was a bit concerned, however, others in Washington are downright scared.

Mr Moore's success raises the possibility that while Republican Party loyalists have sought a means to work with the president, the forces that swept him to power could be beyond even Mr Trump's control.

If an upstart judge can take down a sitting senator with a wealth of resources at his disposal, is anyone in the establishment safe?

Read Anthony's full take here