Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Kentucky must pay the legal fees of lawyers who represented couples denied marriage licenses in 2015 by a county clerk in the state, a federal judge ruled on Friday in a same-sex marriage case that garnered worldwide attention.

U.S. District Judge David Bunning ruled that county clerk Kim Davis herself was not liable to pay the more than $224,700 in fees and associated costs accrued by plaintiffs.

In the days after the Supreme Court legalized gay marriage, Davis, the Rowan County clerk, announced that she would no longer issue marriage licenses to any couple because same-sex marriage conflicted with her Apostolic Christian beliefs.

Rowan County Clerk Kim Davis speaks in 2015 after her office refuses to issue marriage licenses at the Rowan County Courthouse in Morehead, Ky. Timothy D. Easley / AP

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

The refusal made her a national symbol for opposition to the Supreme Court decision. Four couples, including two same-sex marriage couples, filed suit.

Although Bunning issued an injunction at the time requiring Davis’ office to issue the licenses, she continued to refuse. Davis served five days in jail after Bunning ruled her in contempt of court.

The couples' lawsuit was dismissed after Kentucky lawmakers approved changes to the marriage license form that removed the clerk’s name from it, but the plaintiffs’ attorneys, including lawyers from the American Civil Liberties Union, have continued to seek payment for their work.

Bunning ruled on Friday that they were entitled to repayment, but he declined to make Davis responsible.

“Davis represented the Commonwealth of Kentucky when she refused to issue marriage licenses to legally eligible couples,” he wrote in his order. “The buck stops there.”

Related: Court Revives Gay Couple's Case Against Kentucky Clerk Kim Davis

“(W)e hope this serves as a reminder to Kentucky officials that willful violations of individuals’ civil liberties, such as what occurred here, will not only be challenged but will also prove costly,” William Sharp, ACLU of Kentucky’s legal director, said in a statement on Friday.

Mat Staver, Davis’ attorney, said in a phone interview on Friday that he disagreed with Bunning’s decision, but he was happy that neither his client nor the county had to pay the lawyers' fees.

“We definitely consider it a victory,” said Staver, founder and chairman of Liberty Counsel, a Florida-based Christian religious advocacy organization. He said the ruling would likely put an end to other lawsuits against his client over the marriage-license standoff.

Representatives for Kentucky Governor Matt Bevin said in a statement that they were reviewing the opinion and had not made a decision on whether or not to appeal Friday's ruling.