Evangelical voters in the US reeled in shock as their chosen candidate lost in Alabama, handing the state to a Democrat for the first time in 25 years.
Doug Jones' victory is a slap in the face to Donald Trump and his evangelical backers who turned a blind eye to Roy Moore's sexual misconduct and voted overwhelmingly for the Republican.
Exit polls suggest white evangelicals backed Moore by as much as 81 per cent - the same proportion that voted for Donald Trump last November.
Up until the last moment evangelical leaders were backing Moore and his assault on the Republican establishment. Franklin Graham, son of famous evangelist Billy Graham and head of the Billy Graham Evangelistic Association, tweeted: 'Praying for Roy Moore' as polls closed.
There was no mention of praying for Doug Jones.
Jerry Falwell also tweeted his support for Moore on Tuesday, saying Alabama voters 'are too smart to let the media & Estab Repubs & Dems tell them how to vote'.
Russell Moore, president of the Ethics and Religious Liberty Commission of the Southern Baptist Convention, was among very few evangelical leaders to openly oppose Moore. As the results came in he reposted a tweet from last month that said: 'A church that worships Jesus stands up for vulnerable women and girls. A church that worships power sees them as expendable.'
But while Moore's strategy of appealing to Christian nationalism worked with white evangelicals, a large proportion of whom don't actually hold to core evangelical beliefs, other deeply devout voter groups, such as black women in Alabama, gave Jones a huge boost with 98 per cent backing the Democrat.
Moore himself initially refused to accept his defeat. 'We know God is always in control,' he said quoting Psalm 40. 'What we have to do is wait on God and let this process play out.'
The dangers of citing God as your political supporter were laid bare on Wednesday morning. Janet Porter, a spokeswoman for Roy Moore's campaign had said Moore's victory would prove 'that our God is bigger than the billionaires, our God is more powerful than the politicians and our God is more mighty than the media.'
What Moore's defeat says about God's power remains to be seen.
Donald Trump's reaction was surprisingly gracious to Jones and while he tried to row back on his support for his own candidate Moore.
'Congratulations to Doug Jones on a hard fought victory. The write-in votes played a very big factor, but a win is a win. The people of Alabama are great, and the Republicans will have another shot at this seat in a very short period of time. It never ends!,' he tweeted.
He later added: 'The reason I originally endorsed Luther Strange (and his numbers went up mightily), is that I said Roy Moore will not be able to win the General Election. I was right! Roy worked hard but the deck was stacked against him!'
This leaves US evangelicals in a bleak position. They have sold their moral uprightness in exchange for a grab at power twice — first in Trump and now in Moore. Moore lost. And if Trump's ratings continue to tumble they will be left without power, without voice and without credibilty.
For more on the US evangelicals' predicament, Christian Today's editor Mark Woods has written this analysis.