A federal judge issued a temporary injunction against a California state law that requires presidential candidates to disclose their tax returns to appear on the primary ballot.

President Trump Donald John TrumpFederal prosecutor speaks out, says Barr 'has brought shame' on Justice Dept. Former Pence aide: White House staffers discussed Trump refusing to leave office Progressive group buys domain name of Trump's No. 1 Supreme Court pick MORE's lawyers and the Republican National Committee had challenged the law.

U.S. District Judge Morrison England Jr., a George W. Bush appointee on the U.S. District Court for the Eastern District of California, said there would be "irreparable harm without temporary relief" for Trump and other candidates if he did not make the rare temporary decision to block the law, The Los Angeles Times reported.

ADVERTISEMENT

The California law, which was signed by Gov. Gavin Newsom Gavin NewsomOVERNIGHT ENERGY: California seeks to sell only electric cars by 2035 | EPA threatens to close New York City office after Trump threats to 'anarchist' cities | House energy package sparks criticism from left and right California seeks to sell only electric cars by 2035 EPA head questions connection of climate change to natural disasters MORE (D), requires candidates for president or governor to provide five years of federal tax returns to appear on the state's primary ballot.

The judge's decision came after a hearing on Thursday in Sacramento on consolidated arguments made in five lawsuits over the California law. During the hearing, England focused on the issue of whether a federal financial disclosure law preempts states from imposing additional rules, the Times reported.

A lawyer for California argued that different states already have different rules for their primary elections, while a lawyer for Trump argued that the U.S. Constitution established rules for running for president that states cannot alter, according to the Times.

Trump attorney Jay Sekulow Jay Alan SekulowNow, we need the election monitors Judge denies Trump's request for a stay on subpoena for tax records Judge throws out Trump effort to block subpoena for tax returns MORE praised the judge's decision.

“We are encouraged that the federal court has tentatively concluded that a preliminary injunction should be granted. We look forward to the court’s written order," he said in a statement. "It remains our position that the law is unconstitutional because states are not permitted to add additional requirements for candidates for president, and that the law violated citizens’ 1st Amendment right of association."

The injunction will likely be appealed by state officials.

Trump is the first president in decades who hasn't voluntarily released any of his tax returns. He has said he won't do so while he's under audit, though the IRS has said that audits don't prevent people from releasing their tax information.

Trump has filed many lawsuits in an effort to prevent his tax returns from being disclosed. Earlier on Thursday, he filed a lawsuit to block a subpoena the Manhattan District Attorney's Office issued to his accounting firm for his tax returns and other financial records.

Updated at 5:49 p.m.

Morgan Chalfant contributed.