A California law that sought to require candidates to publish tax records in order to appear on the ballot has been ruled unconstitutional by the state’s Supreme Court Thursday.

The “Presidential Tax Transparency and Accountability Act,” which was signed by California Democratic Governor Gavin Newsom in July, required candidates running for president or governor in the state to hand over the five most recent years of tax returns to the California secretary of state to qualify for the ballot.

The California Supreme Court unanimously struck down the law Thursday ruling it a direct violation of the state constitution which mandates the state government to operate an “open presidential primary whereby the candidates on the ballot are those found by the secretary of state to be recognized candidates throughout the nation or throughout California.”

The state’s highest court found that the new legislation passed by Democrats flew “in conflict with the [state] constitution’s specification of an inclusive open presidential primary ballot.”

Democrats have demanded President Donald Trump to release his tax returns ever since he announced his White House bid four years ago, from using various lawsuits in state and local jurisdictions to their oversight powers in the House of Representatives to subpoena for their release speculating on improper conduct.

Trump however, has successfully concealed his tax records from public eyes, though recent rulings show the pendulum on the issue could be moving in Democrats’ favor.

Earlier this month, a federal judge in Washington D.C. dismissed a legal challenge from Trump seeking to prohibit the House Ways and Means Committee from obtaining the president’s tax returns by using a New York state law. In a new ruling Monday, Judge Carl Nichols ruled that Democrats must give ample notice to determine the legality of claims requiring the records from the state, providing Trump with an opportunity to challenge them.