TALLAHASSEE, Fla. (AP) — Florida taxpayers are going to pay nearly $500,000 for the state’s losing battle to keep intact a voter-approved ban on gay marriage.

State officials have now reached settlements with two separate groups of attorneys representing same-sex couples that challenged the state’s ban. Attorney General Pam Bondi’s office reached a final settlement on Wednesday that brought the total to $493,000.

U.S. District Judge Robert Hinkle ordered the state in April to pay the fees of attorneys who successfully sued the state.

Hinkle ruled the ban unconstitutional in August 2014, but he postponed implementing the ruling pending appeals that were further along in other federal courts. Same-sex couples started getting married throughout the state in January 2015, six months before the U.S. Supreme Court legalized gay marriage across the country.

Florida negotiated separate settlements because two federal lawsuits challenging the ban were consolidated into one case. The American Civil Liberties Union of Florida represented eight couples who got married in other states and challenged the ban. Bondi’s office agreed to pay $213,000 for their attorneys.

The Jacksonville attorneys who represented two other same sex couples initially asked for Hinkle to award them as much as $460,000 in the case, but they agreed this week to accept $280,000.

Florida first banned same-sex marriages nearly two decades ago, and voters reinforced that ban when they passed a constitutional amendment in 2008. Bondi maintained that she had a constitutional duty to defend the ban because it had been approved by voters.

In some of the initial court filings, lawyers for Bondi’s office argued that recognizing same-sex marriages performed in other states would disrupt Florida’s existing marriage laws and “impose significant public harm.”

© 2016, Associated Press, All Rights Reserved.

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