See more of the story

The financial crisis was in full swing when Donald Trump traveled to Chicago in late September 2008 to mark the near-completion of his 92-floor skyscraper.

The fortunes of big companies, small businesses and millions of Americans — including the Trumps — were in peril. But the family patriarch was jubilant as he stood on the terrace of his gleaming glass tower.

"We're in love with the building," Trump gushed. "We're very, very happy with what's happened with respect to this building and how fast we put it up."

He and his family hoped the Trump International Hotel & Tower would cement their company's reputation as one of the world's marquee developers of luxury real estate.

Instead, the skyscraper became another disappointment in a portfolio filled with them. Construction lagged. Condos proved hard to sell. Retail space sat vacant.

Yet for Trump and his company, the Chicago experience also turned out to be something else: the latest example of his ability to strong-arm major financial institutions and exploit the tax code to cushion the blow of his repeated business failures.

The president's federal income tax records, obtained by the New York Times, show for the first time that, since 2010, his lenders have forgiven about $287 million in debt that he failed to repay. The vast majority was related to the Chicago project.

How Trump found trouble in Chicago, and maneuvered his way out of it, is a case study in doing business the Trump way.

When the project encountered problems, he tried to walk away from his huge debts. For most individuals or businesses, that would have been a recipe for ruin. But tax-return data, other records and interviews show that rather than warring with a notoriously litigious and headline-seeking client, lenders cut Trump slack — exactly what he seemed to have been counting on.

Ultimately, Trump's lenders forgave much of what he owed.

Those forgiven debts are now part of a broader investigation of Trump's business by the New York attorney general. They normally would have generated a big tax bill, because the Internal Revenue Service treats canceled debts as income. Yet as has often happened in his long career, Trump appears to have paid almost no federal income tax on that money, in part because of large losses in his other businesses, the Times' analysis of his tax records found.

Alan Garten, the Trump Organization's chief legal officer, said the company and Trump appropriately accounted for and paid all taxes due on the forgiven debts.

"These were all arm's-length transactions that were voluntarily entered into between sophisticated parties many years ago in the aftermath of the 2008 global financial crisis and the resulting collapse of the real estate markets," Garten said.

The Trump International Hotel & Tower was the biggest thing Trump ever built. It was also the last.

To pay for the construction, Trump arranged for two of his LLCs, 401 North Wabash Venture and its parent company, 401 Mezz Venture, to borrow more than $700 million.

Trump went to his longtime lender, Deutsche Bank, for the bulk of the money. Since 1998, he had borrowed hundreds of millions of dollars from the German bank. It had been so eager to establish a foothold in the United States that it had overlooked his history of defaults.

Deutsche Bank agreed to lend $640 million to 401 North Wabash Venture. Trump agreed to personally guarantee $40 million of the loan. If his LLC were to default, Deutsche Bank could collect that money directly from Trump.

Trump also went to Fortress Investment Group, a hedge fund and private equity company, for $130 million. This was a so-called mezzanine loan, which meant that it would be repaid only after the Deutsche Bank debt had been satisfied. Because of the greater risk, the Fortress loan came with a double-digit interest rate. If Trump defaulted, his lenders could seize the building.

Using a thick black pen, Trump signed the loan agreements Feb. 4, 2005. A month later, construction began.

With the financial crisis enveloping the world, finding buyers for multimillion-dollar apartments suddenly became much harder. In the spring of 2008, Trump asked Deutsche Bank to delay the loan's due date. The bank gave him an extra six months.

In mid-September, the crisis crescendoed with the bankruptcy of Lehman Bros. Financial markets went haywire. The economy was on the precipice of a depression.

Trump sought another extension. This time, Deutsche Bank said no.

Trump's company still owed Deutsche Bank about $334 million in principal and interest, and Fortress $130 million, not including interest and fees.

Trump and his companies sued Deutsche Bank and Fortress, along with the other banks and hedge funds that had purchased pieces of the loans.

Deutsche Bank soon filed its own lawsuit, accusing its longtime client of being a habitual deadbeat and demanding immediate repayment of the now-defaulted loans.

Why didn't the lenders seize the building?

Going to court to take over the unfinished skyscraper promised to be a costly, yearslong process, especially given Trump's reputation for using the legal system to drag out fights and grind down opponents. It seemed simpler to resolve the dispute.

On July 28, 2010, lawyers for Trump, Deutsche Bank and Fortress notified the court that they had reached a private settlement. The terms weren't disclosed.

But Trump's federal tax returns, as well as loan documents filed in Cook County, Ill., provide clues to what happened: Trump was let off the hook for about $270 million. It was the type of generous financial break that few American companies or individuals could ever expect to receive, especially without filing for bankruptcy protection.

Although Deutsche Bank had vowed to do no more business with Trump, his son-in-law, Jared Kushner, introduced him to his personal wealth manager at the bank, Rosemary Vrablic. Vrablic, with the support of her superiors, soon agreed to restart the relationship with Trump.

In 2012, Vrablic's division made two loans secured by the Chicago skyscraper: one for nearly $54 million, another for $45 million, according to loan documents filed with the Cook County Recorder of Deeds. Trump agreed to personally guarantee the new loans, according to several people familiar with the deal.

The funds were used to immediately repay the $99 million that Trump still owed on the original Chicago loan, the people said. In other words, one wing of Deutsche Bank was providing Trump the money to repay another division of the same bank.

Meanwhile, the skyscraper's fortunes have withered. Most of its retail space has never been occupied, the Real Deal reported last year.