(CNN) A federal judge has ordered a temporary injunction against the California law requiring presidential candidates to release their tax returns to secure a spot on the state's presidential primary ballot -- a law aimed at President Donald Trump, who has not released his tax returns.

In a ruling Thursday, US District Court Judge Morrison England, Jr., said that California cannot force candidates to disclose their tax returns as outlined in a new state law. England said he would make his final ruling on the law before October 1.

Even as the temporary injunction will likely face appeals from state officials, the decision marks a clear victory for Trump who sued California last month to challenge the state law. The Trump administration has resisted various large-scale efforts to obtain the President's tax returns, a battle that has largely played out in courts.

Trump has claimed that ongoing IRS audits have stopped him from making his tax returns public, even though audits don't prevent individuals from releasing tax returns.

While the law in question covers all presidential candidates, those in court Thursday acknowledged it was all aimed at one person.

Read More