Twenty-five states that unsuccessfully defended same-sex marriage bans in federal court have agreed or been ordered by a judge to pay more than $13.5 million in legal fees to the challengers.

The U.S. Supreme Court’s 2013 decision in U.S. v. Windsor—striking down a key provision of the Defense of Marriage Act—opened the floodgates to lawsuits challenging state marriage bans as unconstitutional. There was a flurry of litigation in federal courts leading up to the high court’s decision in June in Obergefell v. Hodges declaring a national right to same-sex marriage.