The National Organization for Marriage (NOM) on Thursday lost its fight to keep secret its donors from the 2009 people's veto campaign that repealed Maine's gay marriage law.

The Maine Supreme Judicial Court unanimously upheld a lower court's ruling against NOM.

NOM had argued that handing over the names to election officials would violate donors' First Amendment rights and possibly leave them exposed to “threats, harassment and reprisal,” the Bangor Daily News reported.

Maine Attorney General Janet Mills applauded the ruling, saying that “the public has a right to know who wrote the checks in the amount of nearly $2 million that went through NOM into the Stand for Marriage Maine” campaign.

According to the ruling, the Maine Commission on Government Ethics and Elections Practices asked for the donor names “to evaluate the oral communications NOM made in soliciting donations during the 2009 election season, a critical issue in determining NOM's compliance with Maine's campaign laws.”

Fred Karger of Rights Equal Rights filed the original complaint against NOM which triggered the case.

“NOM has worked overtime to demonize the LGBT community and deny us our full equality, while refusing to reveal where all its millions of dollars to do so come from,” Karger said in a statement. “Now we will finally find out.”

After lawmakers legalized marriage for gay and lesbian couples in 2009, opponents took it down by putting it to a “people's veto.” Supporters returned to the ballot box last year and won. Maine became a marriage equality state on January 1, 2013.