A federal appeals court says a gay couple's lawsuit seeking damages from a Kentucky county clerk who refused to issue them a marriage license can proceed.

Rowan County Clerk Kim Davis refused to issue a marriage license to David Ermold and David Moore in 2015 because she said it violated her religious beliefs. Ermold and Moore sued, along with several other couples. Davis lost, and spent five days in jail for refusing to follow a court order.

The state legislature passed a law that removed county clerks' names from licenses. A district judge ruled this satisfied Ermold and Moore's lawsuit and dismissed the case. But they appealed, saying they wanted Davis to pay damages.

A federal appeals court ruled Tuesday the case could continue.

Michael Gartland, one of the attorneys representing Ermold and Moore, told WKYT's Garrett Wymer that the suit never should have been thrown out, because, even though the couple eventually got their marriage license, they still went through emotional distress and had their constitutional rights violated when they were denied one.

"That doesn't go away because the office in Rowan County started issuing licenses to same-sex couples," Gartland said. "That doesn't mean we weren't damaged by the constitutional violation that happened months earlier. That's what this case is about."

Gartland did not have a dollar amount on the damages his clients are seeking, but he said it will not be a multimillion-dollar figure. Still, he said, he believes the couple deserves those damages.

Liberty Counsel, whose attorneys are representing Davis, has not yet responded to WKYT's request for comment on the ruling.

The case now goes back to Judge David Bunning, a district judge for the U.S. District Court for the Eastern District of Kentucky. Bunning is the same judge who dismissed the lawsuit as "moot."

The entire process could take another year or two, Gartland said.

Gartland says this case may also finally settle the question of whether Kim Davis' actions violated the constitution, or whether she has the religious freedom to do what she did. (Gartland said previous cases had preliminary findings that showed as such, but nothing with evidence or through appellate court rulings.)