The Obama administration on Wednesday announced that it will stop enforcement of a law that blocks the spouses of gay veterans from receiving equal benefits.

In a letter to congressional leaders, Attorney General Eric Holder said that President Barack Obama had directed the executive branch to stop enforcing the law. Holder said that he had made the recommendation to the president.

The action comes less than a week after a federal judge in California ruled unconstitutional the portion of the U.S. Code that defines a spouse for the purpose of veterans' benefits to be a person of the opposite sex.

(Related: Judge rules VA can't deny veterans' benefits to married gay couple.)

“Decisions by the Executive not to enforce federal laws are appropriately rare,” Holder said in his letter. “Nevertheless, the unique circumstances presented here warrant non-enforcement.”

Holder noted the Supreme Court decision striking down the Defense of Marriage Act (DOMA), saying that the provisions in the veterans benefits law ran afoul of the court's June ruling.

“Indeed, following the Supreme Court's decision in Windsor,” which struck down DOMA, “the Bipartisan Legal Advisory Group of the U.S. House of Representatives (BLAG) withdrew from pending litigation challenging the constitutionality of the Title 38 provisions,” Holder told Congress.

The AP reported that the decision does not apply to gay couples who live in a state that does not recognize their marriages. A spokesman for the Department of Veterans Affairs said the issue is under review.

“There's no reason to treat veterans who live in one state differently than veterans who happen to live in a state that doesn't recognize them,” Michael Cole-Schwartz, a spokesman for the Human Rights Campaign (HRC), the nation's largest LGBT advocate, told the AP.

(Read Holder's letter to Congress.)