A federal judge ordered a temporary injunction Thursday against California’s first-in-the-nation law requiring candidates to disclose their tax returns for a spot on the presidential primary ballot, an early victory for President Trump but a decision that will undoubtedly be appealed by state officials.

U.S. District Judge Morrison C. England Jr. said he would issue a final ruling by the end of the month but took the unusual step of issuing the tentative order from the bench. He said there would be “irreparable harm without temporary relief” for Trump and other candidates from the law signed by Gov. Gavin Newsom in July.