For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

Last week, Deutsche Bank, the struggling financial giant that is Donald Trump’s biggest lender, anointed a new CEO, a longtime executive named Christian Sewing. He’s worked in a number of roles at the bank, but what’s significant about his résumé is the job he held prior to his promotion: He oversaw the firm’s private bank, the division that caters to high-net-worth clients and has loaned Trump’s company hundreds of millions of dollars over the years, when few lenders (including Deutsche Bank’s own commercial lending arm) would do business with the bankruptcy-prone businessman. According to Trump’s financial disclosures, he has loans with the bank totaling as much as $364 million.

Sewing, who has worked for the German bank since 1989, was tapped in 2015 to run the firm’s retail and private banking divisions. During his tenure, the private bank made a $170 million loan to the Trump Organization to finance its new Washington, DC, hotel—one of at least four loans it has made to Trump and his businesses over the years. (The private bank also loaned money to a failed business venture that Donald Trump Jr. was involved in.) It was also during Sewing’s stint running the private bank that the company began to grapple with some of the sticky issues that arise when you hold hundreds of millions in debt belonging to the president of the United States.

Trump made a personal guarantee on some of his loans, meaning that in the event of a default by the Trump Organization, he would be personally responsible for some of the money owed to the bank. In late 2016 and early 2017, Deutsche Bank’s private banking division reportedly attempted to restructure Trump’s various debts in an effort to remove his guarantees from the agreements, since the prospect of having a sitting president on the hook for tens of millions of dollars seemed problematic. But the effort to renegotiate the loans foundered.

“Discussions about the loans have moved from the bank’s lending experts, who were trying to strip out the personal recourse, to more senior managers, who are assessing the political ramifications of any restructuring,” reported Bloomberg last March. It’s not clear if Trump’s loans were ever restructured.

Having Trump as a client became a headache for the bank in other ways, particularly after congressional committees and special counsel Robert Mueller began probing ties between the Trump campaign and Russia. Mueller’s office reportedly subpoenaed Deutsche Bank for information on former Trump campaign chairman Paul Manafort, and according to the New York Times, the US attorney for the Eastern District of New York has sought documents relating to the family of Trump’s son-in-law, Jared Kushner. The news that Mueller was seeking records from Deutsche Bank reportedly enraged Trump so much that he considered firing Mueller, but aides talked him down.

A Deutsche Bank spokesman declined to discuss whether Sewing has interacted with Trump or his company and whether he has participated in discussions concerning Trump’s loans. He also declined to comment on the extent to which Deutsche Bank has cooperated with investigators. But the bank said last year in a blanket statement regarding Trump-related probes, “Deutsche Bank takes its legal obligations seriously and remains committed to cooperating with authorized investigations into this matter.” The Trump Organization did not respond to a request for comment.

Trump first sought financing from Deutsche Bank in 1998 through the bank’s commercial lending side, following a string of business failures that brought him to the brink of financial ruin. The real estate mogul’s history of defaults made him radioactive to many banks, but Deutsche Bank took a gamble on him. It lent him $125 million for his 40 Wall Street office building and another $300 million toward the purchase of Trump World Tower, a condo project across the street from the United Nations in New York. Deutsche Bank later helped Trump take control of Manhattan’s General Motors building, which he successfully sold a few years later.

Trump’s relationship with the bank hit a rough patch after it lent him $640 million to finance the construction of his Chicago hotel and condo tower in 2005. When the 2008 financial crisis hit, the housing market tanked just as the project neared completion. Trump had personally guaranteed the loan with $40 million of his own money. Struggling to keep up with his loan payments, he sued the bank for $3 billion, claiming it had caused the global financial crisis, which had in turn slowed down condo sales in his building.

The dispute was ultimately settled, but according to one banker who was close to the deal, as far as the bank’s commercial lending division was concerned, “he was persona non grata after that.” At this point, Trump’s business with the bank seemed to shift exclusively to the private side.

The private bank currently holds four Trump loans. In addition to the financing for Trump’s DC hotel, it made two loans, totaling $125 million, to bankroll his company’s purchase and redevelopment of the Doral golf course in Miami. The bank also loaned Trump $69 million to refinance debt related to the Chicago project.

Trump’s debts to Deutsche Bank and other lenders have alarmed ethics experts who point out that these loans could form a major source of leverage over the president, to the point of posing a possible national security threat. The stakes are that much higher given that Deutsche Bank is a foreign lender, one with a precarious financial future and a history of regulatory run-ins, including with the US Justice Department. In recent years, the bank has been plagued by losses. Meanwhile, it has racked up a series of fines, several running into the billions of dollars, for offenses ranging from marketing toxic mortgage-backed securities to abetting Russian money-laundering.

The Trump administration’s moves concerning the German lender have already raised questions. Last fall, CNN reported that the Justice Department had quietly dropped an investigation into the firm’s involvement in Russian money-laundering.

The bank’s relationship with Trump and his company is sure to be a delicate matter for the duration of Trump’s presidency. If Sewing wasn’t navigating these issues previously, he surely will be now as CEO.