The New York Times has released the following report:

Donald Trump proudly acknowledges he did not pay a dime in federal income taxes for years on end. He insists he merely exploited tax loopholes legally available to any billionaire -- loopholes he says Hillary Clinton failed to close during her years in the U.S. Senate. "Why didn't she ever try to change those laws so I couldn't use them?" Trump asked during a campaign rally last month.

But newly obtained documents show that in the early 1990s, as he scrambled to stave off financial ruin, Trump avoided reporting hundreds of millions of dollars in taxable income by using a tax avoidance maneuver so legally dubious his own lawyers advised him that the Internal Revenue Service would likely declare it improper if he were audited.

Thanks to this one maneuver -- which was later outlawed by Congress -- Trump potentially escaped paying tens of millions of dollars in federal personal income taxes. It is impossible to know for sure because Trump has declined to release his tax returns, or even a summary of his returns, breaking a practice followed by every Republican and Democratic presidential candidate for more than four decades.

Tax experts who reviewed the newly obtained documents for The New York Times said Trump's tax avoidance maneuver, conjured from ambiguous provisions of highly technical tax court rulings, clearly pushed the edge of the envelope of what tax laws permitted at the time. "Whatever loophole existed was not 'exploited' here, but stretched beyond any recognition," said Steven M. Rosenthal, a senior fellow at the nonpartisan Tax Policy Center who helped draft tax legislation in the early 1990s.

Moreover, the tax experts said the maneuver trampled a core tenet of American tax policy by conferring enormous tax benefits to Trump for losing vast amounts of other people's money -- in this case, money investors and banks had entrusted to him to build a casino empire in Atlantic City.

As that empire floundered in the early 1990s, Trump pressured his financial backers to forgive hundreds of millions of dollars in debt he could not repay. While the cancellation of so much debt gave new life to Trump's casinos, it created a potentially crippling problem with the IRS. In the eyes of the IRS, a dollar of canceled debt is the same as a dollar of taxable income. This meant Trump faced the painful prospect of having to report the hundreds of millions of dollars of canceled debt as if it were hundreds of millions of dollars of taxable income.

But Trump's audacious tax-avoidance maneuver gave him a way to simply avoid reporting any of that canceled debt to the IRS. "He's getting something for absolutely nothing," John L. Buckley, who served as the chief of staff for Congress' Joint Committee on Taxation in 1993 and 1994, said in an interview

The new documents, which include correspondence from Trump's tax lawyers and bond offering disclosure statements, might also help explain how Trump reported a staggering loss of $916 million in his 1995 tax returns -- portions of which were first published by The Times in October.

U.S. tax laws allowed Trump to use that $916 million loss to cancel out an equivalent amount of taxable income. But tax experts have been debating how Trump could have legally declared a deduction of that magnitude at all. Among other things, they have noted that Trump's huge casino losses should have been offset by the hundreds of millions of dollars in taxable income he surely must have reported to the IRS in the form of canceled casino debt.

By avoiding reporting his canceled casino debt in the first place, however, Trump's $916 million deduction would not have been reduced by hundreds of millions of dollars. He could have preserved the deduction and used it instead to avoid paying income taxes he might otherwise have owed on books, TV shows or branding deals. Under the rules in effect in 1995, the $916 million loss could have been used to wipe out more than $50 million a year in taxable income for 18 years.

Trump declined to comment for this article.

"Your email suggests either a fundamental misunderstanding or an intentional misreading of the law," Hope Hicks, Trump's spokeswoman, said in a statement. "Your thesis is a criticism, not just of Mr. Trump, but of all taxpayers who take the time and spend the money to try to comply with the dizzyingly complex and ambiguous tax laws without paying more tax than they owe. Mr. Trump does not think that taxpayers should file returns that resolve all doubt in favor of the IRS. And any tax experts that you have consulted are engaged in pure speculation. There is no news here."

Trump financed his three Atlantic City gambling resorts with $1.3 billion in debt, most of it in the form of high-interest junk bonds. By late 1990, after months of escalating operating losses, New Jersey casino regulators were warning that "a complete financial collapse of the Trump Organization was not out of the question." By 1992, all three casinos had filed for bankruptcy and bondholders were ultimately forced to forgive hundreds of millions of dollars in debt to salvage at least part of their investment.

The story of how Trump sidestepped a potentially ruinous tax bill from that forgiven debt emerged from documents recently discovered by The Times during a search of the casino bankruptcy filings. The documents offer only a partial description of events, and none of Trump's tax lawyers agreed to be interviewed for this article.

Republican presidential nominee Donald Trump throws his fist into the air as he steps off his plane at a campaign rally at Atlantic Aviation near Albuquerque International Airport October 30. (Chip Somodevilla / Getty Images)

At the time, Trump would have been hard-pressed to pay tens of millions of dollars in taxes. According to assessments of his financial stability by New Jersey casino regulators, there were times in the early 1990s when Trump had no more than a few million dollars in his various bank accounts. He was so strapped for cash that his creditors were apoplectic when they learned that Trump had bought Marla Maples an engagement ring estimated to be worth $250,000.

It is unclear who first glimpsed a way for Trump to dodge a huge tax bill. But the basic maneuver he used was essentially a new twist on a contentious strategy corporations had been using for years to avoid taxes created by canceled debt.

The strategy -- known among tax practitioners as a "stock-for-debt swap" -- relies on mathematical sleight of hand. Say a company can repay only $60 million of a $100 million bank loan. If the bank forgives the remaining $40 million, the company faces a large tax bill because it will have to report that canceled $40 million debt as taxable income.

Clever tax lawyers found a way around this inconvenience. The company would simply swap stock for the $40 million in debt it could not repay. This way, it would look as if the entire $100 million loan had been repaid, and presto: There would be no tax bill due for $40 million in canceled debt.

Best of all, it did not matter if the actual market value of the stock was considerably less than the $40 million in canceled debt. (Stock in an effectively insolvent company could easily be next to worthless.) Even in the opaque, rarefied world of gaming impenetrable tax regulations, this particular maneuver was about as close as a company could get to waving a magic wand and making taxes disappear.

Alarmed by the obvious potential for abuse, Congress and the IRS made repeated efforts during the 1980s to curb this brand of tax wizardry before banning its use by corporations altogether in 1993. But while policymakers were busy trying to stop corporations from using this particular ploy, the endlessly creative club of elite tax advisers was inventing a new way to circumvent the ban, this time through the use of partnerships.

This was the twist that was especially beneficial to Trump. Wealthy families like the Trumps often own real estate and other assets through partnerships rather than corporations. Trump, for example, owned all three of his Atlantic City casinos through partnerships, an arrangement that allowed casino profits to flow directly to his personal tax returns when times were good.

But what if times were bad? What if Trump's casino partnerships could not repay hundreds of millions of dollars they owed to bondholders? And what if the bondholders were persuaded to forgive this debt? Wouldn't that force the partnerships -- i.e., Trump -- to report hundreds of millions of dollars of taxable income in the form of canceled debt?

Enter the tax advisers with their audacious plan: Why not eliminate all that taxable income from canceled debt by swapping "partnership equity" for debt in exactly the same way corporations had been swapping company stock for debt.

True enough, the IRS and Congress had clearly signaled their disapproval of the basic concept. Fred T. Goldberg, who was the IRS commissioner under President George Bush, recalled in an interview that the IRS frowned on partnership equity-for-debt swaps for the same reason it objected to corporate stock-for-debt swaps. "The fiction is that the partnership interest has the same value as the debt," he said. Lee A. Sheppard, a contributing editor to Tax Notes, wrote in 1991 that trying to find a legal justification for this tactic was akin to proving "the existence of the Loch Ness monster."

On the campaign trail, Trump boasts of his mastery of tax loopholes and claims no other candidate for the White House has ever known more about the tax code. This background, he argues with evident disgust, gives him special insight into the way wealthy elites buy off politicians and hire high-priced lawyers and accountants to rig the tax system -- just as, he claims, they rig elections.

That insight was on display in 1991 and 1992 when he was laying the groundwork to make a multimillion-dollar tax bill disappear.

Before proceeding with his plan, Trump did what most prudent taxpayers do -- he sought a formal tax opinion letter. Such letters, typically written by highly-paid lawyers who spend entire careers mastering the roughly 10,000 pages of ever-changing statutes that make up the U.S. tax code, can provide important protection to taxpayers. As long as a tax adviser blesses a particular tax strategy in a formal opinion letter, the taxpayer most likely will not face penalties even if the IRS ultimately rules the strategy was improper.

The language used in tax opinion letters has a specialized meaning understood by all tax professionals. So, for example, when a tax lawyer writes that a shelter is "more likely than not" going to be approved by the IRS, this means there is at least a 51 percent chance the shelter will withstand scrutiny. (This is known as an "MLTN" letter in the vernacular of tax lawyers.) A "should" letter means there is about a 75 percent chance the IRS will not object. The gold standard, a "will" letter, means the IRS is all but certain to bless the tax avoidance strategy.

But the opinion letters Trump received from his tax lawyers at Willkie Farr & Gallagher were far from the gold standard. The letters bluntly warned that there was no statute, regulation or judicial opinion that explicitly permitted Trump's tax gambit. "Due to the lack of definitive judicial or administrative authority," his lawyers wrote, "substantial uncertainties exist with respect to many of the tax consequences of the plan."

The Trump Plaza Hotel and Casino, which closed in Sept. 2014, in Atlantic City, N.J., July 14, 2014. Trump declared a $916 million loss on his 1995 income tax returns, a tax deduction so substantial it could have allowed him to legally avoid paying any federal income taxes for up to 18 years, records obtained by The New York Times show. (Matt Rainey / The New York Times)

One letter, 25 pages long, analyzed seven distinct components of Trump's proposed tax maneuver. It found only "substantial authority" for six of the components. In the stilted language of tax opinion letters, the phrase "substantial authority" is a red flag that the lawyers believe the IRS can be expected to rule against the taxpayer roughly two-thirds of the time. In other words, Trump's tax lawyers were telling him there were at least six reasons the IRS would likely cry foul if he were audited. In anticipation of that possibility, the lawyers even laid out a fallback plan that would have allowed Trump to spread the pain of a large tax hit over many years if the IRS ultimately balked.

It is unclear whether the IRS ever challenged Trump's use of this specific tax maneuver. According to a financial disclosure statement prepared by Trump's accountants, he was under audit by tax authorities as of 1993, only a year after he avoided reporting hundreds of millions of dollars in taxable income because of this legally suspect tactic. But the results of that audit are unknown and the agency declined to comment Monday.

Regardless of whether the IRS objected, Trump's tax avoidance in this case violated a central principle of U.S. tax law, said Buckley, the former chief of staff for Congress' Joint Committee on Taxation who later served as chief tax counsel for Democrats on the House Ways and Means Committee.

"He deducted somebody else's losses," Buckley said. By that Buckley means that only the bondholders who forgave Trump's unpaid casino debts should have been allowed to use those losses to offset future income and reduce their taxes. That Trump used the same losses to reduce his taxes ultimately increases the tax burden on everyone else, Buckley explained. "He is double dipping big-time."

In any event, Trump can no longer benefit from the same maneuver. Just as Congress acted in 1993 to ban stock-for-debt swaps by corporations, it acted in 2004 to ban equity-for-debt swaps by partnerships.

Among the members of Congress who voted to finally close the loophole: Sen. Hillary Clinton of New York.

Written by David Barstow, Mike McIntire, Patrcia Cohen, Susanne Craig and Russ Buettner of The New York Times.

Posted by Hannah Wise, breaking news reporter.