MOBILE, Ala. (AP) — A federal judge is ordering the state of Alabama to pay $315,000 in fees over the state’s losing court fight about gay marriage.

The order by U.S. District Judge Callie Granade of Mobile says the state should pay fees and other costs to lawyers who fought to allow same-sex marriage in the state.

The Alabama attorney general’s office declined comment Thursday on the order, which was issued Jan. 20.

Most Alabama counties are now issuing marriage licenses to same-sex couples because of a U.S. Supreme Court decision, but it took lawsuits to make that happen after the U.S. Supreme Court effectively legalized gay marriage nationwide.

The money will goes to groups including the Montgomery-based Southern Poverty Law Center, where attorney Scott McCoy says Alabama’s resistance to gay marriage cost taxpayers.

© 2017, Associated Press, All Rights Reserved.

This material may not be published, broadcast, rewritten, or redistributed.