Just five years ago, the commercial real estate market was thriving. The delinquency rate on mortgage loans was at a record low, and the volume of new mortgages being sold to investors was at a record high.


Now the first of the mortgages that were securitized in 2007 have started to come due, and it is becoming clear just how bad many of the loans were. The time when investors were most eager to buy turns out to have been the worst time to do so.


Commercial mortgages — unlike residential ones — are seldom issued for periods of longer than 10 years, and often for as little as five. Many require no principal repayments during that period but call for the entire amount to be repaid in a balloon payment at the end of the loan. So it can be at maturity when the bad news arrives.


“Only 28 percent of the loans from 2007 due to mature in 2012 managed to pay off in full,” said Manus Clancy, the senior managing director at Trepp L.L.C., which monitors the commercial mortgage market.


Other loans in those securitizations were for seven or 10 years, so new waves of losses may arrive in 2014 and again in 2017.


Perhaps no loan that was securitized in 2007 illustrates the craziness of the market at the time better than one for a group of apartment buildings in Manhattan. The owner of the buildings was already under investigation for the tactics he had been using to raise rents, but that fact was not mentioned in the prospectus for the securitization. What was disclosed was the supreme optimism involved in underwriting the loan. The 36 apartment houses, owned by a group run by Joel S. Wiener, had produced cash flow of $5.4 million in 2006, but they secured a loan of $204 million, on which annual interest payments of $12.7 million would be required.


How could such a loan be justified? The prospectus said Deutsche Bank made the loan based on forecasts that by 2012 the cash flow would have soared to $18 million a year, as market rents in New York rose rapidly while many tenants in rent-stabilized and rent-controlled apartments moved out. It assumed that Mr. Wiener’s costs would barely increase while rents soared.


The way the bank did the math, those apartment buildings were worth $255 million, so the loan was for only 80 percent of market value.


In court papers, Mr. Wiener has since asserted that Deutsche Bank expected he would be able to convert the buildings, many of them five- and six-story walk-ups, into condominiums.


That loan turned out badly for the securitization that bought it from the German bank, but it also appears to have turned out badly for many tenants in the more than 1,000 apartments. The only way Mr. Wiener’s company, the Pinnacle Group, could hope to meet the mortgage payments was to raise the rents drastically and quickly. He may not have needed any incentive to harass tenants to leave, but the loan provided one.


By the time the loan was made, Mr. Wiener’s reputation as a landlord controlling more than 21,000 apartments in New York City was so notorious that it had attracted several investigations, including one by the New York attorney general. Betsy Gotbaum, the city’s public advocate at the time, had asked Richard F. Levy, a senior partner with the Chicago law firm of Jenner & Block, to represent tenants pro bono in a suit contending that Pinnacle routinely harassed and intimidated tenants and illegally sought to evict thousands of them. That suit was later filed and has since been settled on terms that could force Pinnacle to reduce rents for many tenants and to pay damages to others who say they were harassed.


The loan went into default in early 2009, but Pinnacle continued to run the apartments. In November, the securitization sold the loan for $116.7 million. Ben Carlos Thypin, the director of market analysis at Real Capital Analytics, calculates that after all fees are considered, “the net loss to bondholders was 49 percent of the original loan balance.”


Now the apartments are being run by a court-appointed receiver while the new owner of the loan fights in court with Pinnacle over control of the buildings.


Mr. Wiener seems likely to eventually lose control of the apartments, but he probably will walk away with a huge profit. The loan made by Deutsche Bank, and sold to the securitization, was a refinancing that enabled Mr. Wiener to take out far more than the buildings turned out to be worth. I would have asked him about that, but his office said he was traveling and unavailable for comment.