Same-sex married couples can start applying for Social Security and veterans benefits in all 50 states even though there are still issues to fix as the federal government works to implement the Supreme Court ruling allowing gay couples to marry nationwide.

Attorney General Loretta Lynch announced Thursday every same-sex couple will have marriage benefits made available to them amid the landmark ruling.

Most of the federal marriage benefits were already available to same-sex couples, following a 2013 Supreme Court ruling that struck down the federal ban on gay marriage. However, some Social Security and veterans benefits for spouses were still denied to those couples if they lived in states that didn’t recognize same-sex marriage.

"I am proud to announce that the critical programs for veterans and elderly and disabled Americans, which previously could not give effect to the marriages of couples living in states that did not recognize those marriages, will now provide federal recognition for all marriages nationwide," Lynch said in a statement. "The agencies are currently working towards providing guidance to implement this change in law."

Before the Supreme Court’s 5-4 ruling on same-sex marriage last month, 13 states still didn’t recognize same-sex marriage. Lynch said the government will strive to "fulfill our commitment to equal treatment for all Americans."

The federal government still faces challenges on how to implement the ruling, Vickie Henry said. Henry is a senior staff attorney for Gay & Lesbian Advocates & Defenders, a legal advocacy group.

For example, Social Security had been denying spousal benefits to same-sex married couples if — at the time they applied for benefits — they were living in a state that did not recognize their marriage. Also, they were denied survivor's benefits if their same-sex spouse died while living in a state that did not recognize their marriage.

Same-sex spouses who were denied benefits may not be able to go back to Social Security and re-apply.

Likewise, the Department of Veterans Affairs had been denying spousal benefits if — at the time they applied for benefits — couples were living in a state that did not recognize their marriage.

Spouses may be able to reapply if the VA denied their applications for pensions, home loans, education benefits, medical services and burial benefits.

However, both agencies have not come to a decision on how to handle the benefits issue. Both Social Security and Department of Veterans Affairs say stay tuned.

"With this terrific statement from the attorney general, the devil is in the details," Henry said. "Marriage benefits are available to same-sex couples nationwide, and that's as it should be. I think that is what the Supreme Court ruling requires. But what does that mean?"

In a statement, Social Security said same-sex couples should apply for benefits right away, if they believe they qualify.

"Applying now will preserve your filing date, which will protect you against the loss of any potential benefits," the agency said.

The VA said in a statement that it will work quickly to issue new guidance. In the meantime, the agency says it will temporarily wait to rule on claims that were not covered before the Supreme Court ruling.

The Associated Press contributed to this report.