A new development in a major lawsuit against Trump University could put Donald Trump's campaign for the presidency to the test. A US federal judge has ordered the release of business documents at the heart of a class action suit charging that Trump's defunct enterprise was a pricey scam.

Judge Gonzalo Curiel agreed with a court action filed by the Washington Post, arguing that Trump's candidacy made his business dealings a matter of public interest, and that a dead business has no need of secrecy, as Trump and his attorneys have argued.

Just hours before the ruling, Trump lashed the hispanic judge, indicating Curiel is out to get him apparently because of the candidate's position against Mexican immigrants and for building a wall between the US and Mexico.

Curiel "happens to be, we believe, Mexican," Trump said at a rally in San Diego, California, where several anti-Trump protesters were arrested Friday 27 May.

Trump called the judge a "hater of Donald Trump" who had "railroaded" him in the case, adding: "I think Judge Curiel should be ashamed of himself. I think it's a disgrace that he is doing this."

Trump has struggled mightily to keep the lawsuit and any information linked to it out of the news at least until after the general presidential election. He has argued the records linked to the case involve proprietary business information that will be used when he one day resurrects the university.

But Curiel wasn't buying it. Trump's "assertion that the information retains any commercial value is speculative given the lack of any support for the statement that Trump University 'may' resume operations," Curiel stated in his decision. He also said that over the course of the lawsuit against Trump University, the candidate had "placed the integrity of these court proceedings at issue."

The judge referred to a previous case in noting that courts deciding on public disclosure must weigh "whether a party benefiting from the order of confidentiality is a public entity or official; and . . . whether the case involves issues important to the public."

Two class action lawsuits in San Diego accuse Trump University of using deceptive practices as it collected millions of dollars from clients who were told they would become successful in real estate once they learned Trump's techniques. Trump has denied the accusations of fraud, and representatives have said the seminars were professionally run and students were satisfied.

The "university," which offered workshops - including a $1,495 (£1,025) three-day seminar and a $35,000 (£24,00) "gold-level" package - begun in 2004 and sold to some 10,000 students. Trump owned 93% of the enterprise, which was shut down in 2010.

In addition to the class action lawsuits, former New York Attorney General Eric Schneiderman filed a $40 million lawsuit in 2013 alleging that Trump had defrauded more than 5,000 individuals through Trump University, which was never licensed as an educational institution.

Trump created a marketing video boasting that all of the professors were "hand picked by me." But an executive of the enterprise said that in fact "none of the professors at the live events" were chosen by Trump.

Curiel ordered some 1,000 pages of documents to be released on Thursday (2 June).

One of Trump University's business "playbooks" - which laid out sales techniques - was leaked earlier this year by Politico. One section instructed salespeople to collect information on clients to assess their liquid assets to determine who could afford more coursework.