The California Supreme Court on Thursday, in a unanimous opinion, struck down a law that would have required all presidential candidates to release their tax returns if they want to appear on the state’s presidential primary ballot.

The action was the latest blow to Democrats’ efforts to pry open President Trump’s finances and the second against the measure in recent months. A federal judge earlier blocked its implementation, saying it likely violates the U.S. Constitution.

The deadline for filing petitions to get on California’s March primary ballot is Tuesday.

The Presidential Tax Transparency and Accountability Act would have required candidates for president and governor to reveal five years of tax information.

The court said, in an opinion written by Chief Justice Tanni G. Cantil-Sakauye, the dispute revolves around the interpretation of a section of the state constitution that gives the Legislature the responsibility for setting up primaries and how the secretary of state determines who is a valid candidate.

"The Legislature may well be correct that a presidential candidate's income tax returns could provide California voters with important information," Cantil-Sakauye allowed. But the constitution leaves it up to voters to decide if withholding that information will have consequences at the polls.

Trump’s attorneys argued the law violated candidates’ First Amendment rights.

The court said by imposing an additional requirement on presidential candidates than those imposed on other candidates, the law was in conflict with the constitution’s provision that only an “affidavit of noncandidacy” can keep a candidate off the ballot.

Trump is the only presidential candidate in recent history not to release his tax returns. Candidates began releasing them ever since Richard Nixon was cited for having improperly claimed a $500,000 tax deduction for donating his papers that reduced his tax bill significantly.

The court said allowing the law to stand would deprive voters of the guarantee that they be given a choice among all recognized candidates for president who do not take their names off the ballot.

The bill was signed into law earlier this year by Gov. Gavin Newsom and sold as a means of giving voters the information they need to evaluate candidates, but critics argued it was nothing more than a naked political power grab.

“We are pleased that the courts saw through the Democrats’ petty partisan maneuvers and saw this law for what it is — an unconstitutional attempt to suppress Republican voter turnout,” Republican state party Chairwoman Jessica Millan Patterson said in a statement.

During the 2016 campaign, Trump declined to release his tax returns, saying they were under audit, but pledged he would release them. That has yet to happen.

Earlier this week, he asked the U.S. Supreme Court to prevent House Democrats and the Manhattan District Attorney’s Office from obtaining his tax information from his accountants.