Allowing California to require U.S. presidential candidates to reveal their tax returns would "open the floodgates" for states to demand other information including medical records and school transcripts, a Sacramento federal judge said Tuesday in an order blocking the new state law.

U.S. District Judge Morrison England Jr.'s order, affirming an earlier tentative decision, stops California from enforcing a law that would have required President Donald Trump to disclose his tax returns to appear on the 2020 primary ballot. Trump has resisted releasing his returns despite promising to do so as a candidate in 2016.

"The dangerous precedent set by this act, allowing the controlling party in any state's legislature to add substantive requirements as a precondition to qualifying for the state's presidential primary ballot, should concern all candidates alike, Republican, Democrat, or otherwise," England wrote. "It certainly concerns the court."

England's order formalizes a tentative ruling the judge announced from the bench after oral arguments Sept. 19. Parties in five consolidated cases, including Trump, his campaign and state and national Republicans, had sought the preliminary injunction granted Tuesday.

State leaders have not announced whether they will appeal the order, although England said in September that he was announcing his ruling tentatively so both sides could prepare to take the case to the U.S. Court of Appeals for the Ninth Circuit.

Democratic state Sen. Mike McGuire, the bill's author, said last month that England "got this one wrong and a decision as important as this should not have been rushed or the law prematurely shut down."

California Republican Party Chairwoman Jessica Millan Patterson called the decision "a victory for California voters and their ability to vote for the candidate of their choice in March. This decision rightfully stops the Democrats' petty politics and their efforts to disenfranchise millions of California voters and suppress Republican voter turnout."

England's opinion noted that California's Office of Legislative Counsel concluded that a previous version of the bill that became law this year would be unconstitutional. The judge also cited former Gov. Jerry Brown's message accompanying his veto of that bill.

"Despite both Governor Brown's warning and the Legislative Counsel's earlier admonition, the lead authors of SB 149 announced their intent to reintroduce the bill when California had a new governor," England wrote.

England also noted that, while it has become a common practice, not all presidential candidates have released their tax returns.

If requiring candidates to disclose their finances was the state's "even-handed objective, it presumably would have passed some version of the act in 1992, when former California Governor Jerry Brown elected not to release his tax returns while running for the Democratic nomination for president," England wrote. "At base, the act seeks to punish a class of candidates who elect not to comply with disclosing their tax returns by handicapping their access to the electoral process. This is plainly impermissible."

England wrote that the state's desire to provide voters information about a presidential candidate's potential conflicts of interest "are both legitimate and understandable."

"It is not the job of the courts, however, to decide whether a tax return disclosure requirement is good policy or makes political sense," the judge wrote. "Those are questions delegated to the political branches of the federal government, that is Congress and the president, under Articles I and II of the United States Constitution."

Trump's lawyers at Consovoy McCarthy are pursuing cases in Washington and New York federal trial courts that would shield the president's tax returns from public disclosure. The U.S. House Ways and Means Committee, and state prosecutors in New York, are seeking copies of Trump's returns.

Trump contended on the campaign trail in 2016 that he could not release his tax returns, as many presidential candidates have, because he was under an audit. Tax lawyers have said Trump, despite any audit, still could release those returns.