(Chip Somodevilla/Getty Images)

A federal judge on Tuesday said the Federal Election Commission failed to enforce campaign finance disclosure requirements against an outside group that ran political advertisements in the weeks leading up to the 2010 midterms.

The ruling comes after a years-long dispute between the FEC and the government watchdog group Citizens for Responsibility and Ethics in Washington (CREW) over whether federal record-keeping and disclosure requirements should have applied ahead of the 2010 elections to the conservative-leaning American Action Network, a nonprofit and "dark money" group.

CREW challenged the FEC’s rulings on two complaints that it filed against the American Action Network, which can receive and spend unlimited sums of money without disclosing its donors as long as its political activity is limited.

CREW alleged in its complaints, dating to 2012, that certain ads paid for by the American Action Network should be considered “electioneering” activity intended to influence elections, and therefore subject to federal disclosure requirements of who paid for the ads.

The FEC deadlocked on both complaints along party lines and dismissed both complaints filed by CREW.

The FEC must now reconsider its previous dismissals within 30 days, per the ruling. The FEC said it does not comment on litigation. “This relates to activity in 2010 and has been in litigation for years. The FEC has dismissed this complaint twice,” said a spokeswoman for the American Action Network.

[Despite pledge to ‘drain the swamp,’ Trump has shown little interest in beefing up the Federal Election Commission]

In Tuesday’s ruling, Judge Christopher R. Cooper of the U.S. District Court for the District of Columbia pointedly criticized the FEC’s dismissals of CREW’s complaints in his 30-page ruling, at one point posing a rhetorical question to the commissioners: “Seriously?”

Cooper found the ads had “election-related purpose,” based on their timing and content, and met the federal definition of “electioneering communication.”

Cooper said the FEC’s dismissals of the complaints ran “contrary to law” and were based on erroneous and narrow interpretations of federal statutes governing the panel’s enforcement powers.

“I hope that [the ruling] means the Federal Election Commission is going to have to be more rigorous and more serious in enforcing election laws,” Noah Bookbinder, CREW's executive director, said in an interview. “The fact that we're now eight years removed from the election where this happened, and the FEC can't get it together to enforce the law is disgraceful. Hopefully, Judge Cooper's decisions will force them to act, not just in this case, but in a lot of cases.”