Kim Davis, the Rowan County clerk in Kentucky, arrives before US President Barack Obama delivers the State of the Union Address during a Joint Session of Congress at the US Capitol in Washington, DC, January 12, 2016. Kim Davis, a born-again Christian, was jailed briefly in September 2015 for contempt of court after refusing to issue marriage licenses due to her opposition to gay marriage, which the Supreme Court legalized across the United States in June. Barack Obama will give his final State of the Union address, perhaps the last big opportunity of his presidency to sway a national audience and frame the 2016 election race. AFP PHOTO / SAUL LOEB / AFP / SAUL LOEB (Photo credit should read SAUL LOEB/AFP/Getty Images)

Kim Davis, the Kentucky clerk who went to jail because she refused to issue marriage licences to same-sex couples in 2015, has lost her bid for re-election.

Davis was defeated by Elwood Caudill Jr. in the race for Rowan County clerk at the US midterm elections held on Tuesday (November 6).

Caudill, a civil servant, won by just about 650 votes, winning a total 4210 votes against Davis’ 3566.

Davis became a right-wing icon when she refused to uphold the 2015 US Supreme Court ruling on marriage equality, claiming that issuing same-sex marriage licences would go against her Apostolic Christian religious beliefs.

Following her refusal, four couples (two same-sex and two heterosexual) sued Davis over her actions, with help from the American Civil Liberties Union (ACLU). She was jailed for five days for contempt of court in 2015.

Kim Davis did not lose to the gay man she discriminated against

David Ermold, a gay man who was denied a marriage licence from Davis, ran in the Democratic primary to challenge the clerk for her position. He eventually lost to Caudill, despite reportedly raising thousands of dollars for his campaign.

Caudill celebrated his victory on Tuesday. “I believe that as a community we must continue to work together toward a more prosperous and cohesive Rowan County,” he said, quoted in local news outlet Lexington Herald-Leader. “Tonight was awesome.”

Davis announced her re-election bid in January. Initially elected as a Democrat, Davis sought re-election as a Republican. She enjoyed the support of Kentucky’s Republican governor Matt Bevin, who changed the state law on marriage licences in 2016 to help Davis end her legal troubles.

How much did Kim Davis earn as a clerk?

Bevin called Davis “an inspiration” in a speech earlier this year.

“I think Kim Davis is without question an inspiration, not only to leaders like myself—people in the public arena and those outside the public arena—but to my children, the children of America,” he said.

“People, even if they disagree with her, have got to respect the fact that here is a woman who was willing to put it all on the line out of conviction for what she believed and knew to be her right as an American citizen.”

Voters appeared to disagree with Bevin’s assessment. Davis’ election defeat means she loses a job that pays about $80,000 a year, according to The Associated Press.

LGBT+ rights advocates celebrated her defeat. “Good riddance to her discriminatory nonsense and disrespect for law and order,” wrote Human Rights Campaign’s Charlotte Clymer on Twitter.

“Some very local but some very good news. Vote all the bigots out,” tweeted Scott Hechinger, Brooklyn Defender Services senior staff attorney and director of policy.