In the summer of 2008, Michael Bloomberg made a truly artful deal. In a $4.4 billion deal that included only $110 million in cash, the then-New York City mayor purchased Merrill Lynch’s 20 percent share of his media company Bloomberg, LP. The transaction bumped Bloomberg’s estimated individual net worth from $11.5 billion to over $15 billion.

That’s a handsome sum. According to Fortune, the media mogul mayor had “pickpocketed” one of Wall Street’s most venerable investment houses. As suggested by Merrill’s ownership of such a large stake, Mike Bloomberg was also taking money from an old friend.

Amid the meltdown of 2008, Bloomberg’s longtime business partner, often referred to as “Mother Merrill,” had fallen on hard times. Spurred by its hard-charging ex-CEO, Stanley O’Neal, the formerly cautious investment house lost big betting on risky bundles of subprime mortgages. But now the mayor who had fought off regulation of predatory lending during his first term cashed in. Call it the Wall Street version of the American Dream.

Although the sale of its stake in Bloomberg was presented as a way to shore up Merrill’s sinking capital position, the small amount of cash Merrill received in the deal (only 3 percent of the nearly $4.5 billion transaction, with the remainder paid in long-term notes) puzzled Street observers. After all, while its CEO commanded City Hall, Bloomberg LP was a growing company and a far sounder investment than junk mortgages.

Why Bloomberg was allowed to retain his role at his company while serving as mayor merits scrutiny. In 2002, the city’s Conflict of Interest Board (CoIB) — all appointees of the mayor — signed off on that arrangement, while at the same time forcing Bloomberg, whose worth at the time was an estimated $4 billion, to sell off $45 million in stock he held in other companies.

As veteran Newsday reporter Paul Moses explained at the time, the CoIB ruled that even though Bloomberg LP had business dealings with many companies that relied on City Hall for contracts, that was permissible because none of the arrangements exceeded 4 percent of the LP’s total revenue. “One wonders just how many millions of dollars that would mean,” Moses wrote.

Moses also called attention to the mayor’s business dealings with Merrill Lynch. In the spring of 2002, as the firm was bidding to underwrite the city’s municipal bonds, Bloomberg appointed Stan O’Neal to the Lower Manhattan Development Corporation, which oversaw the post-9/11 rebuilding of the financial district.

O’Neal had risen in the ranks at Merrill to become the first black CEO of a leading Wall Street firm. He thus added diversity to the LMDC’s sixteen-member board. But the appointment also insured the continuance of Bloomberg’s long-standing ties to Merrill during his tenure at City Hall.

When Bloomberg launched his eponymous media company in 1981, Merrill Lynch bought the first computer terminal required to access the private network. The firm, which soon held a 30 percent stake in the financial news outlet, helped market the terminals. “The alliance of Bloomberg and Merrill Lynch was mutually beneficial,” the eventual New York City mayor wrote in Bloomberg by Bloomberg (1997).

A latecomer to the boom in subprime mortgage bundling in the early 2000s, Merrill under O’Neal plowed forth recklessly. According to the Wall Street Journal, the Financial Crisis Inquiry Commission created by the US Congress in 2009 turned up evidence that O’Neal “may have violated securities laws by making misleading representations to investors about the firm’s exposure to holdings related to mortgages.”

The inflated claims helped create Merrill’s 2008 predicament, which led to Bank of America acquiring the firm amid the meltdown that September. What the mayor knew about O’Neal’s handiwork is unclear. But this much is certain: amid the Great Recession, Mike Bloomberg made a killing.