David Ermold, an assistant professor of English at the University of Pikeville in Kentucky, declared his candidacy for Rowan County Clerk at Coffeetree Books in Morehead on Wednesday.

But his journey to seeking public office truly began more than two years ago, in June 2015, when the Supreme Court handed down its landmark decision, Obergefell v. Hodges, legalizing same-sex marriage.

Like so many gay couples across the country, Ermold and David Moore watched history unfold on TV. About a week later, they headed to the local courthouse in Morehead to get a marriage license.

“We were excited,” Ermold told NBC News. “We knew there might be some problems, so we anticipated some feedback.”

That feedback came when Davis, in her role as county clerk, refused to issue a license to the two Davids, citing "God's authority."

The public's eye soon turned from Washington to Morehead, a small town in Rowan County known until then for its hiking trails and picturesque lake but suddenly the site of a drama that captivated the nation, one featuring Ermold, Moore and Davis as its central characters.

“I believe I can win”

“We were frustrated and disappointed,” Ermold said of the first time Davis turned him and Moore away. “We’ve always treated people how we expect to be treated, and that’s not the way it was."

Ermold filmed their first attempt (they made four attempts in all) to obtain a marriage license in the county courthouse. He later uploaded it to social media, and it became the spark that lit the fuse.

“We weren’t anticipating it would blow up,” Ermold said. “We thought it would get some attention on Reddit, but then the emails started coming from all over.”

Emails were followed by journalists, politicians and pundits, who flocked to the town from across the country.

Davis, who spent five days in jail for refusing to follow court orders and issue marriage licenses to same-sex couples, was met with applause from Mike Huckabee and Sen. Ted Cruz of Texas, who were Republican presidential primary candidates at the time and made public appearances with her in Kentucky.

Rowan County Clerk Kim Davis holds her hands in the air with her attorney Mat Staver (R) and Republican presidential candidate Mike Huckabee in front of the Carter County Detention Center on September 8, 2015 in Grayson, Kentucky. Ty Wright / Getty Images

The Morning Rundown Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“There was a lot of frustration here,” Ermold said of the media attention that engulfed Morehead. “The community didn’t want the attention."

Davis was also met with praise from religious and social conservatives who saw her as a hero willing to stand up for her faith despite pressure from the courts and a rapidly changing world that had grown more accepting of same-sex marriage.

Two years after their fateful encounter, Ermold and Davis are slated to bump heads again — this time, as opponents in the election for Rowan County Clerk.

“I believe I can win,” Ermold said.

Davis is also optimistic about her chances of victory, according to her lawyer, Mat Staver, founder of the conservative Liberty Counsel.

"She’s not really concerned about David filing to run,” Staver told NBC News. "I talked to her about it, and her reaction is, David has no idea how to run a clerk’s office and has never had any experience.”

“I think he’s way over his head,” Staver added.

“This is our home”

Eighteen years ago, Ermold and Moore had their first date at a Long John Silver's in Letcher County, Kentucky, where Moore is from, after chatting on a website called The Globe.

“It doesn’t exist anymore,” Ermold said of the website, laughing. “It wasn’t a dating service so much as a Facebook back then.”

Ermold hails from the suburbs of Philadelphia, where he said he was picked on in school. His parents were supportive, he said, but he didn’t come out until he was 20. He became the first person in his family to attend college, which is why he initially left his hometown.

Moore, now a graphic designer at Morehead State University, had a similar upbringing in the conservative coal area of Letcher County. The two hit it off, and Ermold moved to Kentucky in 1998 to be with Moore. They moved to Morehead in 2004, where Ermold pursued his Masters in English at Morehead State University. They've never looked back.

(L-R) David Moore and David Ermold on their wedding day at Morehead State University. Courtesy of David Ermold

“Dave and I had our wedding right at the bell tower at Morehead State. It was more than I could have imagined. I was so happy.” Ermold and Moore tied the knot on Sept. 26, 2015, three weeks after one of Davis' deputies issued them a marriage license.

Ermold said his relationship to his community is positive, but he said media coverage of Morehead following Davis' refusal to issue same-sex marriage licenses has given people the wrong impression of the town.

“We have a lot of friends here we’ve built over the years,” Ermold said. “This is our home.”

"There needs to be more integrity"

Ermold said one thing that made him hesitate before throwing his hat in the ring to become Rowan County Clerk was Davis’ funding advantage. “She will have quite a few orgs backing her, and she will get a lot of attention from it,” he said.

Some have speculated revenge was a motivating factor in Ermold's decision to run, but he denies this, saying he has always been a political person, and the results of the election last year, in particular, also served as a catalyst.

“I was very disappointed in the presidential election, and I think there needs to be more integrity,” he said. “I think politicians need to answer some questions.”

Ermold echoed those sentiments in a statement released Wednesday after he announced his candidacy.

“We must recommit ourselves to embracing the diversity within our community, and we must stand strong against those who have turned their backs on our people to pursue the divisive agenda of outside politicians and organizations,” he said.

Shortly after announcing his candidacy, Ermold made his way to the county clerk's office, the same one where he had been denied his marriage license, to file his official paperwork to run.

As for Davis, Ermold said he hasn’t changed his attitude toward her since that fateful day two years ago, when she rejected him citing "God's authority."

“I do believe in God,” Ermold said. “Just not her version.”

FOLLOW NBC OUT ON TWITTER, FACEBOOK AND INSTAGRAM