Massachusetts Attorney General Martha Coakley filed a federal lawsuit Wednesday challenging the constitutionality of a federal law defining marriage as a union between one man and one woman, which denies same-sex couples married in Massachusetts access to certain federal benefits.

Coakley filed the lawsuit, Commonwealth of Massachusetts v. U.S. Department of Health and Human Services, in the U.S. Court for the District of Massachusetts against the Health and Human Services agency, the U.S. Department of Veterans Affairs and those agencies’ secretaries.