A political nonprofit group founded by campaign advisers to Gov. Phil Murphy has disclosed its donors after resisting pressure to do so for months.

The group, New Direction New Jersey, said late Thursday it had raised about $6.8 million since its inception last year. About two-thirds of that haul, $4.5 million, came from a group affiliated with the New Jersey Education Association, the state’s largest teachers’ union.

Other top donors include labor unions such as the Communications Workers of America ($560,000), Service Employees International Union Local 32BJ ($350,000), and the American Federation of State, County, and Municipal Employees ($100,000). Public-sector labor unions helped elect Murphy, a Democrat, in 2017, and have remained key allies.

Some of the contributions had been reported by news organizations.

“We are clear-eyed to the fact that disclosing our donors will expose our organization to attacks from entrenched Trenton special interests,” Phil Swibinski, a spokesperson for New Direction, said in a statement. “But we have concluded that setting a high standard for transparency is far more important to the broader fight for New Jersey’s future.”

He said all “similarly situated organizations should disclose their donors.”

New Direction registered with the state in January 2018 as a nonprofit. As a so-called social welfare organization, it is not required under federal law to disclose its donors.

Such organizations, known as “dark money” groups, spent nearly $150 million on federal races during last year’s midterm campaign, according to data compiled by the Center for Responsive Politics. Independent political spending also has surged in New Jersey in recent years.

The group initially had pledged to name its donors, then opted not to do so.

But legislation signed by Murphy in June requires nonprofit organizations like New Direction that try to influence elections, ballot questions, and legislation to disclose the names of donors who contribute more than $10,000. Murphy initially opposed the bill but later signed it when it was clear his veto could face an override by the Legislature.

The law is being challenged in court by the ACLU and the conservative group Americans for Prosperity, which say it violates donors’ First Amendment right to free speech.

New Direction paid for television ads during the budget season in June, urging the Democratic-controlled Legislature to raise taxes on high-income earners. Lawmakers refused.