LOUISVILLE, Ky. (AP) -- A gay man in eastern Kentucky has lost his bid to challenge a Republican county clerk who went to jail three years ago for denying him and others marriage licenses in the aftermath of an historic U.S. Supreme Court decision.

David Ermold was seeking the Democratic nomination for county clerk in Rowan County, Kentucky. He hoped to challenge Kim Davis, the religious conservative who said in 2015 "God's authority" prevented her from issuing marriage licenses to same-sex couples.

But Ermold lost to Elwood Caudill in a four-way Democratic primary on Tuesday, despite a campaign that raised more than $200,000 with donations from at least 48 states. Caudill will face Davis in the November general election. No one challenged Davis for the Republican nomination.

Copyright 2018 WDRB Media. All rights reserved.