The judge was out to get him, he said. So was that prosecutor in New York, whom he called a dopey loser on a witch hunt. So were his critics, who he said were all liars. Even some of his own underlings had failed him — bad people, it turned out. He said he didn’t know them.

Donald Trump was in trouble.

Now, he was trying to attack his way out, breaking all the unwritten rules about the way a man of his position should behave. The secret to his tactic: “I don’t care” about breaking the rules, Trump said at a news conference. “Why antagonize? Because I don’t care.”

That was 2016. He was talking about a real estate school called Trump University.

On May 27, 2016, presumptive Republican nominee Donald Trump went on an 11-minute rant about Gonzalo Curiel. (Reuters)

Trump University, which shut down in 2011 after multiple investigations and student complaints, was treated as a joke by many of Trump’s political opponents — much as they treated Trump Steaks or Trump Vodka. But to those who knew the school well, it wasn’t a joke.

It was a premonition.

The saga of Trump University showed how far Trump would go to deny, rather than fix, a problem, they said — a tactic they have now seen him reuse as president many times, including now, in the face of a worsening pandemic. For months, President Trump promised something wonderful but extremely unlikely — that the virus would soon disappear.

John Brown, a former Trump University student from New York, said he understands why some people believed him.

“This is how people get sucked [in]. Because they want it,” Brown said. “That’s what happened to me.” He wanted to succeed so badly that he paid $25,000 for a Trump University “mentorship” program, which left him deeply disappointed.

Another former student, Bob Guillo, said he felt a deep frustration at being unable to prevent Trump University’s saga from playing out again on a far larger stage.

“I tried to warn the American people that if Donald Trump was doing this to me, he’s going to do the same thing if he’s ever elected president,” Guillo said, referring to interviews and TV appearances he did during the 2016 election. “Unfortunately, people believed Trump. And they didn’t believe Bob.”

Now, many former students, instructors and lawyers who sued Trump wonder whether, as he faces a worsening pandemic, they see parallels to another chapter of Trump University’s story. Its end.

Eventually, they said, Trump’s attacks could not conceal the huge gap between Trump University’s promises and its results. He began to lash out, attacking his antagonists as conspirators and fools.

“It’s something I think about all the time,” said Tristan Snell, who was the lead attorney for the New York state attorney general’s office in a lawsuit against Trump University. Snell said the school “had a fulfillment problem”: It could not deliver on the enriching real estate secrets it promised.

“Maybe that’s a good metaphor for what’s happening in America is that we have a fulfillment problem,” he said. “You’ve sold X and Y and Z and you can’t actually fulfill the order.”

In this case, Snell said, what Trump promised but cannot provide is not real estate secrets. It is something even harder to deliver — victory against a deadly disease.

“The difference this time is the fact that he’s running his game on a virus,” Snell said. “And the virus doesn’t care.”

Trump settled three lawsuits against Trump University in 2016, after his election. Trump University paid a total of $25 million but did not admit fault on claims that customers were defrauded by the school. When The Washington Post asked about Trump University recently, the Trump Organization sent a statement that focused on the lawsuits.

“After several years of litigation, Trump University was amicably resolved and settled by the parties with no admission of any liability,” Kimberly Benza, a Trump Organization spokeswoman said in an email. “We remain confident that we would have absolutely prevailed had the case proceeded to trial.”

The White House did not respond to requests for comment.

The questionable tactics used by Trump University did not diminish some former students’ opinions of him, any more than political setbacks have upset his base. Some interviewed for this report said Trump’s political record was good enough to outweigh their bad experience at Trump University.

“Trump 2020!” said Michael Sheehan of New York state.

In 2009, Sheehan paid $1,495 to attend a three-day Trump University seminar at a Marriott in Albany, N.Y. — then discovered it was one long sales pitch for more-expensive programs. “Trump was a big sham,” Sheehan wrote in 2012, summing up his experience in a court affidavit.

Now, Sheehan said, he doesn’t blame Trump for Trump University. The instructors were probably at fault, he said: “I don’t think he sat there and said, ‘Hey, I want you to rip everybody off.’ ”

This year, he doesn’t blame Trump for the worsening of the coronavirus crisis. Trump’s enemies are probably at fault, he said. “You don’t think it’s very convenient,” he said, that the pandemic arrived in an election year?

But others said they felt the experience showed Trump was willing to use his reputation as a tough, heart-of-gold billionaire against them — and to ask them to believe him over their own instincts.

Stephen Gilpin was one of Trump University’s instructors. He recalled sitting in on another instructor’s class shortly after joining the school in 2007. It was nothing more than an up-sell, he said, laden with false promises.

“I thought, ‘Oh my God, we’re all going to be arrested,’ ” Gilpin said.

Now, he and others said, the Trump administration is trying a similar tactic again, by asking people to believe Trump’s rosy predictions about the pandemic — in the face of an increasingly grim reality.

“It’s the same thing he does today,” said Gilpin, who left the school in 2011. “His behavior has now become our norm.”

Trump University began in 2005, when Trump was at the height of his fame from television’s “The Apprentice.” Trump invested about $2 million and took near-complete control over the school, according to court filings by the New York attorney general’s office. One executive said in his deposition that Trump personally approved all the ads.

The basic sales pitch of Trump University was one that Trump would reuse in his 2016 campaign.

The billionaire had made enough money for himself.

Now, he would put his famous brain to work for the little guy.

“Come on America, pull yourself up!” Trump said in one newspaper ad, in the aftermath of the 2008 financial crisis. In the ad, Trump said real estate was where millionaires were made, “and now I’m ready to teach you how to do it.”

But Trump, the billionaire, still wanted them to pay.

The costs ranged from $1,500 for a three-day seminar to $35,000 for a “Gold Elite” mentoring program. One instructor, James Harris, justified the charges this way, according to a 2008 transcript of a class held in Atlanta that was later filed as an exhibit in a lawsuit: The money wasn’t for Trump’s benefit. It was for the students’ benefit. They had to pay Trump, he said, to show they were investing in themselves.

“He is doing this so you assume personal responsibility for doing the work,” Harris said, according to the transcript.

Harris did not respond to questions sent via email for this report. In 2016, he told The Post that “I was told to do one thing” as a Trump University instructor: “Make sure everybody bought” more Trump University seminars. “That is it.”

At Trump University, saying yes didn’t stop the pressure. As Republican leaders would later learn when dealing with Trump himself, saying yes once wasn’t the end. It was the beginning.

“I’m like a sheep led to slaughter,” Dean said.

In Richmond, Dean said, she was told she should take another class, in Houston, on tax liens. It cost $9,997. She paid. In Houston, they told her Trump University had a great investment opportunity for her in Biloxi, Miss., which required a $23,980 payment. She paid again.

In the end, Dean said, she wound up with no property in Mississippi, no valid tax liens and not enough skills to become a real estate investor. She had paid more than $30,000, borrowing from her tax-sheltered annuity.

“It was a bitter thing for me. Here I am, I am a lowly schoolteacher, public school teacher. Donald Trump is, according to him, a very rich man,” Dean said. “Now here I am, having to pay money back for enriching someone that’s already rich.” She complained in a letter to the Justice Department that was submitted as evidence in the New York attorney general’s lawsuit.

Trump University attracted more than 5,000 paying customers, according to court papers, and took in more than $42 million in revenue. Trump himself got back his $2 million investment and got $5 million in profits on top of that, according to filings from the New York attorney general.

But there was a problem — disgruntled students.

At best, many former students said, their thousands of dollars in payments to Trump University bought them rudimentary knowledge of real estate, basic lessons they could learn anywhere. At worst, they said, they found their classes useless and their high-dollar personal “mentors” unhelpful and hard to reach.

Their complaints had begun to bring scrutiny from state regulators.

In Texas, Trump University pulled out of the state after an investigation by the office of then-Attorney General Greg Abbott (R) — now the state’s governor — concluded that the company was “engaging in false, misleading and deceptive practices” and had defrauded Texas out of $2.6 million. The school had disputed that its classes were deceptive, according to correspondence later obtained by the Dallas Morning News.

An estimated 267 Texans spent more than $425,000 on the three-day seminars, and 39 purchased the $35,000 packages, according to John Owens, who was the Texas attorney general’s deputy chief of consumer protection.

In public, Trump defended his school. “The vast majority of people love us,” Trump told the New York Daily News in May 2010. “Thousands and thousands of people have taken our courses, and very few have complained.”

But soon after, he shuttered Trump University. In its offices on the 32nd floor of a Trump-owned office building, employees were fired so fast that they left desks still covered in work papers, said one former Trump Organization employee who spoke on the condition of anonymity to preserve relationships with the company.

“It was like a horror movie where everyone just died and their bodies disappeared,” the person said.

In California, former students filed two class-action suits against Trump University, in 2010 and 2013. In New York, then-Attorney General Eric Schneiderman (D) filed another in 2013, alleging Trump University had deceived its students.

What happened next will sound familiar.

Trump attacked.

In New York, Trump filed a formal ethics complaint against Schneiderman, saying the attorney general had pressured him for campaign donations. The state ethics board investigated but decided not to pursue the case, according to news reports.

Then there were the personal attacks on Schneiderman, whom Trump publicly called “dopey” and a “loser.” On Twitter, Trump also accused Schneiderman of wearing makeup.

“It’s Tuesday. @AGSchneiderman is wearing Revlon eyeliner today,” Trump wrote in 2014. Schneiderman, who resigned his office in 2018 after allegations he had abused women, declined to comment for this report. He has said his long eyelashes are a side effect of glaucoma medication.

As the class-action lawsuits proceeded in California in 2016, Trump used Twitter to criticize Gonzalo Curiel, the federal judge hearing those cases, as un-American. Curiel was born in Indiana to parents who were Mexican immigrants. Trump called him “Mexican,” saying he was biased because of Trump’s hard line on illegal immigration.

Those attacks paralleled the bitterest moments of Trump’s political career — his attacks on GOP primary rival Ted Cruz’s father and wife, his insults aimed at special counsel Robert S. Mueller III and then at witnesses during Trump’s impeachment trial. All aimed to cast doubt on an authority — or authority figures — that might turn against Trump.

In the Trump University case, opposing lawyers said, they learned how to deal with Trump’s eruptions. Ignore them. Keep digging. Let Trump talk to himself.

“As difficult as it is, you can’t get distracted with the mudslinging or name-calling,” said Rachel Jensen, one of the attorneys in the California class-action cases. “You have to remain disciplined and focused on the substance. Over time, it pays off.”

In Texas, after a months-long investigation relying on undercover agents attending seminars, the attorney general’s office drafted a lawsuit in 2010 seeking $5.4 million in restitution and penalties. “We had the goods on them,” Owens said.

But Owens’s bosses did not file the suit. David Morales, then deputy attorney general, said that he spiked the suit without Abbott’s input. “I approved an investigation into this company in Fall 2009 and did not file suit in Spring 2010 due to lack of consumer complaints,” he said in a recent email.

In Florida, staffers for then-Attorney General Pamela Bondi (R) also pondered whether to pursue an investigation of Trump University. Bondi’s office chose not to. Around the same time, Bondi received a $25,000 political donation from Trump, made via Trump’s charitable foundation. Bondi’s staff said the donation did not affect its decision.

Since then, Bondi and Morales have risen to greater prominence. In 2018, Trump nominated Morales to be a federal judge. And Trump chose Bondi — now out of office — to be one of his attorneys during his impeachment trial earlier this year.

But it was hardly a moment of loss for Trump.

He had just been elected president, having beaten a slew of rivals who had tried to use Trump University’s problems against him.

“Donald Trump’s election benefited Trump University students around the country,” Jensen said. “For everyone else, all I could say was ‘I’m sorry.’ ”

Now, former students and staffers at Trump University say there is something familiar about the present moment.

Trump is again struggling to fulfill a promise and again facing a growing backlash. His presumptive opponent in the 2020 election, Democrat Joe Biden, seems to have learned the lawyers’ lesson, ignoring many of Trump’s attacks instead of amplifying them with tit-for-tat responses.

But some former Trump University students say it’s too early to believe that the covid-19 crisis will doom Trump’s presidency after one term. They say they learned in 2016 that there were enough people who believed in Trump the way they used to.

There might be enough in 2020, too.

“I think there are many people who are saying — they’ve pulled the curtain back, and they’re saying, ‘Who’s this person behind the curtain?’ ” said Brown, the former Trump University student who spent $25,000 on classes. “Others are still under the spell, this magical spell.”

“My father’s one of them,” Brown said. He told his father, a Trump supporter, about his experiences with Trump University. “He just said, ‘Yeah, yeah.’ That was it.”

Alice Crites contributed to this report.