Balloons spell out the word "love" over the Supreme Court in Washington, Friday June 26, 2015, after the court declared that same-sex couples have a right to marry anywhere in the US. Photo: Jacquelyn Martin, AP

Balloons spell out the word "love" over the Supreme Court in Washington, Friday June 26, 2015, after the court declared that same-sex couples have a right to marry anywhere in the US. Photo: Jacquelyn Martin, AP

SIOUX FALLS, S.D. — South Dakota on Friday agreed to pay $242,000 to attorneys for same-sex couples who challenged the state’s ban on gay marriages.

Attorney Josh Newville told The Associated Press the deal was finalized Friday, bringing to a close the lawsuit filed in federal District Court in May 2014.

Newville sued the state on behalf of six same-sex couples, challenging South Dakota’s ban on gay marriages and its refusal to recognize marriages of same-sex couples who legally wed in other states.

U.S. District Court Judge Karen Schreier ruled in Newville’s favor in January, but put her decision on hold pending appeals. A federal appeals court affirmed Schreier’s ruling in August, allowing attorneys to proceed with their plan to seek legal fees from the state.

Newville said he felt the case was resolved for him following Schreier’s ruling in January and the decision by the U.S. Supreme Court in June that legalized same-sex marriage in all 50 states.

“This is just sort of background. What this case was really about was people’s rights and treating people equally,” he said.

The settlement provides about $182,000 to Madia Law, the Minneapolis firm for which Newville works, and about $59,000 to the National Center for Lesbian Rights, a national gay rights group who provided additional legal counsel in the case.

Under federal law, attorneys in federal civil rights cases can petition a court to award them legal fees if a court finds in their favor.

“The state has an obligation to defend the constitutionality of its laws, and this is a part of that process,” said Tony Venhuizen, chief of staff for Gov. Dennis Daugaard.

© 2015, Associated Press, All Rights Reserved.

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