A federal judge on Friday ordered Kentucky to pay more than $224,000 in legal fees and costs because one of its county clerks had refused to issue marriage licenses to same-sex couples.

The order, handed down by Judge David L. Bunning of United States District Court, moved the protracted case one step closer to conclusion, about two years after the Rowan County Clerk, Kim Davis, defied a landmark Supreme Court ruling in 2015 and decided not to issue the marriage licenses.

Ms. Davis’s actions, which came at a watershed moment for gay rights advocates, reverberated across the country and led to lawsuits, the passage of a new Kentucky state law and resulted in Ms. Davis being briefly sent to jail for contempt of court.

By Friday, Judge Bunning noted in his 50-page order, the case had finally “boiled down to a single remaining issue: attorney’s fees.”