By Andy Sullivan
(Reuters) - Alabama voters elected conservative firebrand Roy Moore as the Republican nominee for a U.S. Senate seat on Tuesday, dealing a blow to President Donald Trump and other party leaders who had argued that rival Luther Strange was a better bet to advance their priorities in Washington.
An outspoken evangelical Christian who has twice lost his position as the state's top judge, Moore won election with a fierce anti-Washington message and a call to put religion at the center of public life.
"We have to return the knowledge of God and the Constitution of the United States to the United States Congress," he said.
With all 67 counties reporting, Moore led Strange by 55 percent to 45 percent.
Despite campaigning for Strange, Trump congratulated Moore for his victory and urged him to defeat Democrat Doug Jones in the December election to fill a seat that was held by Jeff Sessions before he became U.S. Attorney General in February.
"Congratulations to Roy Moore on his Republican Primary win in Alabama. Luther Strange started way back & ran a good race. Roy, WIN in Dec!" Trump wrote on Twitter.
Trump deleted three other Tweets, voicing his supported for Strange. In one deleted Tweet, the president said Strange "will never let you down!" and in another he said "vote today for 'Big Luther,'" according to media.
Moore is favored to win the December election, as Alabama has not elected a Democrat to the Senate since 1992.
Moore, 70, first lost his seat on the Alabama Supreme Court for refusing to remove a Ten Commandments monument from the courthouse and a second time for defying the U.S. Supreme Court's decision to legalize same-sex marriage.
The race exposed rifts between the Republican party's conservative base and its moneyed establishment -- and within Trump's inner circle.
Trump and Vice President Mike Pence appeared with Strange at rallies in the race's closing days and a political group affiliated with Senate Republican Leader Mitch McConnell spent close to $9 million on his behalf.
Moore, meanwhile, drew support from Trump's former chief strategist, Steve Bannon, and his secretary of Housing and Urban Development, Ben Carson.
Bannon said Moore's victory could embolden other grassroots challengers to try to unseat well-funded Republican incumbents in next year's congressional elections.
"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 said at Moore's victory party.
Strange, 64, a former state attorney general, earned a reputation as a reliable Republican vote after he was appointed to the seat in February.
But his close ties to party leaders proved to be a liability with some voters, who questioned whether former Governor Robert Bentley appointed him to Sessions's seat in an attempt to avoid prosecution for a sex scandal. Bentley pleaded guilty to misusing campaign funds and stepped down in April.
"It was sort of a 'you scratch my back and I'll scratch yours,'" said R.L. Barber, 77, a Moore supporter from Birmingham.
Moore's uncompromising style could bring a new level of turbulence to the Senate, where Republicans have struggled to reach consensus on tax and spending issues and have failed repeatedly to roll back Obamacare.
But Moore said he would back the president.
"Don't let anybody in the press think that because he supported my opponent I do not support him and support his agenda," Moore said.
(Additional reporting by Joseph Ax in New York and Wayne Hester in Birmingham, Alabama; Editing by Grant McCool and Toby Chopra)