Donald J. Trump was burning through cash.

It was early 2016, and he was lending tens of millions of dollars to his presidential campaign and had been spending large sums to expand the Trump Organization’s roster of high-end properties.

To finance his business’s growth, Mr. Trump turned to a longtime ally, Deutsche Bank, one of the few banks still willing to lend money to the man who has called himself “The King of Debt.”

Mr. Trump’s loan request, which has not been previously reported, set off a fight that reached the top of the German bank, according to three people familiar with the request. In the end, Deutsche Bank did something unexpected. It said no.

Senior officials at the bank, including its future chief executive, believed that Mr. Trump’s divisive candidacy made such a loan too risky, the people said. Among their concerns was that if Mr. Trump won the election and then defaulted, Deutsche Bank would have to choose between not collecting on the debt or seizing the assets of the president of the United States.