Republican nominee Donald Trump, shown meeting with Latino business leaders Wednesday in Las Vegas, claimed $916 million in losses in 1995, according to a report by the New York Times. (Mike Segar/Reuters)

For two decades, Donald Trump has underscored 1995 as a pivotal point in his rise out of the collapse of his real estate and gambling empire, a debacle that included four bankruptcies and left him nearly $1 billion in the hole.

“Piece by piece, deal by deal, a beautiful picture was beginning to emerge,” he wrote in 1997.

On Monday, Trump took credit for personally engineering that bounceback, in part through the aggressive use of tax breaks.

“I mean, honestly, I have brilliantly — I have brilliantly used those laws,” Trump said at a campaign event in Pueblo, Colo. “I was able to use the tax laws of this country, and my business acumen, to dig out of the real estate mess — you would call it a depression — when few others were able to do what I did.”

The details of Trump’s business dealings during that period make clear the extent to which Trump took advantage of tax and financial maneuvers that help him dig his way out of a failing position. They also reinforce an image of Trump as a bold risk-taker who left a trail of wreckage while serving his own interests.

Now voters are being asked to reconcile two diametrically opposed views of Trump: his own narrative that he is a financial wizard who simply used the laws of the country to protect himself, and Hillary Clinton’s contention that he is a rapacious and unrestrained capitalist who “abuses his power” and “games the system.”

Exactly how he used those tax laws remains unknown in the wake of the revelation by the New York Times that Trump claimed $916 million in losses in 1995 for the purposes of avoiding taxes. That is because Trump refuses to release tax documents that would shed more light on his practices.

In recent days, tax law experts across the country have offered an array of arcane theories about the mechanisms Trump used to avoid paying taxes.

Trump emerged from his financial cataclysm in 1995 through tough negotiation with dozens of creditors and the aggressive use of complex and rarified federal tax rules, possibly including one that Congress later rescinded, according to interviews with a dozen tax experts, company filings and regulatory documents.

The tax law experts interviewed by The Washington Post largely agree that the deductions Trump claimed were probably legal under the tax laws in effect at the time, even though the size of his claims was extraordinary.

Douglas Baird, a law professor at the University of Chicago, said “there’s nothing inherently illegitimate” about using every tax break available.

“That’s the magic that he or his lawyers worked,” Baird said. “I can guarantee you it’s a billion times more complicated than we can imagine.”

Jack Mitnick, the accountant who prepared Trump’s taxes, told The Post that the provisions and loopholes that Trump relied on were routinely exploited by large real estate developers at the time. He declined to provide details.

“More voluminous, not more complex,” Mitnick said, describing the documents that Trump’s organization made available to him in 1995. “It was not an unusual thing.”

But Mitnick played down Trump’s role in formulating the tax strategy.

“He had nothing to do with it,” Mitnick said.

***

By 1987, Donald Trump was soaring. He had built the glittering Trump Tower on Manhattan’s Fifth Avenue, named two casinos in Atlantic City after himself and was about to achieve his first $1 billion ranking on the Forbes 400 list of the richest Americans. He was widely considered to be the epitome of the go-go 1980s.

But his fortunes were about to be undone — by his own bad bets.

Trump wanted a third casino — his grandest yet — and he made a move on the hulking, unfinished Taj Mahal. Analysts had warned that Atlantic City’s gaming market was cooling. Too many casino owners had taken on too much debt.

But Trump charged ahead. Contrary to a stark promise he made to regulators under oath in early 1988 to win approval for the project, he financed the Taj project with $675 million in junk bonds, documents show.

The 1,250-room Taj opened in 1990 as the largest casino-hotel in the world. But by then, Trump’s real estate and gambling empire already faced ruin because of the extensive debt he was carrying — some $3.4 billion.

A confidential report produced by accountants in June 1990 for the Trump Organization showed that only three of its 22 assets were profitable. The report made a startling claim about Trump’s net worth, saying it had plunged to negative $295 million.

“He was hemorrhaging money,’’ said Rob McSween, a former Citibank managing director who was familiar with Trump’s finances at the time.

Facing the possibility of personal bankruptcy, Trump turned his attention to a $100 million line of credit he had with Bankers Trust. That line of credit would be key to Trump’s ability to survive in the coming years.

In an interview for “Trump Revealed,’’ the biography produced by The Post this year, Trump said he drained the account while his bankers were on vacation and could not block such a large transaction.

“I said, ‘Draw it down,’ ” Trump said. “I took everything out of the bank.”

When the bankers found out what had happened, they “went absolutely berserk.”

Trump viewed it as an ingenious move.

Late in 1990, he failed to make the first payment on the Taj junk bonds and his corporate and personal finances went into a tailspin, as lenders demanded repayment.

The first bankruptcy came in 1991, when the Taj sought protection to reorganize. In March 1992, Trump’s Castle and Plaza casinos also filed for bankruptcy. Later that year, the Plaza Hotel in Manhattan also filed for bankruptcy.

In all four cases, Trump settled by giving up half of his equity shares to lenders. Documents prepared for Trump’s organization, along with estimates of the cost of the Taj at the time, show that the casino holdings alone were worth more than $2 billion.

Trump managed to persuade lenders not to hold him accountable for personal guarantees on $832 million of the loans, through at least 1995.

But Trump’s empire was in tatters. “[T]he media was, in fact, gleefully predicting my collapse,” Trump wrote in “Trump: The Art of The Comeback” in 1997.

***

Amidst the gloom, Trump and a small group of executives were taking new steps to set the stage for his revival.

In June 1993, the Trump Organization restructured “a significant portion” of the debts relating to the casinos, according to a report by the New Jersey Division of Gaming Enforcement.

That same year, Trump took out new loans and began amassing anew the accoutrements expected of a mogul.

He bought a small jet that designer Lockheed Martin described as “Luxury Among the Clouds.” He also arranged a lease-purchase agreement for the Boeing 727 airplane he had sold during his financial meltdown. He also took out a mortgage for waterfront property in Palm Beach, Fla.

“There was no way to deny that things were going really great.” Trump wrote.

“My personal debt of $975 million had been reduced to $115 million, and I had two years to finish cleaning it up.”

In 1995, as part of his revival campaign, Trump launched Trump Hotels and Casino Resorts, his first publicly traded company. He billed it as the first chance for ordinary people to buy stock in a Trump enterprise. But it was also a way to cleanse himself of lingering debts.

From the outset, Trump planned to consolidate $1.7 billion in old casino debts inside the company, thus transferring responsibilities to his investors, documents show. Among other things, he was using it to “satisfy the indebtedness of Taj Associates under its loan agreement” with one bank and to make payments “to obtain releases of liens and guarantees” with another bank.

The new company bought all three of his casinos. It paid about $100 million more for the Castle than analysts said the casino was worth, guaranteeing Trump $880,000 in cash bonuses.

During Trump’s 14 years as chairman, the company lost more than $1 billion. Shares plunged from $35 to a low of 17 cents.

In a recent interview with The Post, Trump defended his stewardship of the company.

“All I can say is I wasn’t representing the country,” he said. “I wasn’t representing the banks. I wasn’t representing anybody but myself.”

Also in 1995, Trump claimed on tax forms filed in New York that he had lost $916 million.

Trump has acknowledged the loss claim was part of his effort to minimize or erase the taxes he owed to the federal government. But no one knows the mechanisms that Mitnick, Trump’s accountant, used.

Theories have been flying across the Internet among experts and appearing in news reports for days. One of them put forth on Tax Notes, a website devoted to the nuances of tax law, holds that the move made by Trump’s accountant was “likely to have to do with debt forgiveness and S corporation rules,” under the federal tax code.

Under this scenario, Trump would have received a complex cascade of tax benefits related to the cancellation of his debts and net operating losses from his businesses.

Tax Notes said that such a maneuver enabled entrepreneurs to make a “double dip,” because they were able to avoid paying income tax on debts that had been forgiven and at the same time claim deductions for earlier losses.

The Supreme Court upheld the practice by an 8-to-1 vote in 2001, but Congress later disallowed it as unfair.

Another theory is that Trump proclaimed his insolvency at a time when he was obligated to repay loans and other debts. Theoretically, that would have made him eligible under a related federal tax provision to sidestep income taxes.

Some have suggested that Trump might have used the new public company to shed the tax liability.

Karen Burke, a law professor at the University of Florida, said these and other possibilities are entirely legal if properly invoked. But when too many clever tricks are stacked up to avoid paying taxes, it can create ethical and legal risks.

“Sometimes when you put all the perfectly normal things together, you create a real monster,” she said.

Michael Kranish, Amy Goldstein, Jerry Markon and researcher Alice Crites contributed to this report.