Two legal nonprofit groups filed a class action lawsuit against the Social Security Administration Tuesday for its treatment of married same-sex couples after the Supreme Court struck down a federal law that prevented the federal government from recognizing their marriages.

For almost a year after the Supreme Court struck down the Defense of Marriage Act as unconstitutional in June 2013, the SSA continued to treat Hugh Held and Orion Masters as unmarried.

Despite Held asking the local Social Security branch office in Los Angeles whether the court's ruling, in light of his 2008 marriage to Masters, would mean a change to his Supplemental Security Income (SSI) benefits, he continued to receive his benefits of $877.40 a month.

Then, in June 2014, Held's benefit was reduced to $308.10 a month on account of his marriage to Masters.

Held and Masters were fine with that change, but they are not OK with the $6,205 bill that the Social Security Administration (SSA) also sent Held, the amount, SSA asserts, that Held was overpaid in benefits since the Supreme Court ruling in United States v. Windsor.

On Tuesday, Gay & Lesbian Advocates & Defenders and Justice in Aging filed a class action lawsuit against the Social Security Administration on behalf of Held and Kelley Richardson-Wright, another married person with a same-sex spouse being told to repay SSA's overpayments, and all other people similarly affected. The lawsuit asks for the Social Security Administration to be barred from asking people to repay benefits.

"Unfortunately for married same-sex couples in marriage recognition states, SSA was completely unprepared to implement policies required of it by law after DOMA was struck down," Gerald McIntyre, directing attorney for Justice in Aging, said in a statement. "The victims of that discrimination should not be the ones to pay for the agency's mistake."

The lawsuit claims that "SSA should have recognized Plaintiffs' marriages immediately" after the Windsor decision. "Yet it failed to do so." Then, once SSA finally did begin treating married same-sex couples as married, it asked for overpayments that resulted from not recognizing the marriages.

As GLAD and Justice in Aging's lawyers write, "SSI recipients are now being targeted by SSA for recoupment of overpayments caused by the government's own unlawful actions."

The Social Security Act itself, however, makes it illegal for SSA to seek repayment in this circumstance, the lawyers argue.

"The Social Security Act provisions authorizing overpayment recoupment expressly require SSA to waive recovery of SSI overpayments if (1) the overpaid SSI recipients were not at fault for the overpayment and (2) recoupment would either a) be against equity and good conscience or b) defeat the purposes of the statute," the lawsuit claims.

In other words, the lawyers argue that the overpayments are not the same-sex couples' fault because the Social Security Administration failed to implement the constitutional ruling in Windsor, meeting the first part, and it would be "against equity and good conscience" — basically, unfair — to order repayment.

Specifically, they write, "[I]t is unfair, inequitable, and unconscionable for SSA to demand overpayment from a group of individuals who not only are destitute, but who have been discriminated against by SSA, and then were overpaid by the government's unjustified perpetuation of that very discrimination long after it was held unlawful by the Supreme Court."

The lawsuit was filed in federal court in the Central District of California.