PORTLAND, Maine — A federal judge has upheld Maine’s campaign finance disclosure law as constitutional in a lawsuit brought by an organization that opposes gay marriages.

The National Organization for Marriage sued after the state ethics commission found that the organization was required to disclose the identities of its donors. On Friday, U.S. District Judge D. Brock Hornby granted a summary judgment upholding the constitutionality of Maine’s election disclosure laws.

Maine law says groups that raise or spend more than $5,000 to influence elections must register with the state and disclose their donors. NOM donated $1.9 million to Stand for Marriage Maine, a political action committee that helped repeal Maine’s same-sex marriage law.

It’s unknown whether NOM will appeal. A message left at NOM’s offices in New Jersey wasn’t immediately returned.