Harold Shultz, a senior fellow at the Citizens Housing and Planning Council and a former city housing official, said that both deals emerged in an era when investors stopped looking at complexes like Savoy Park and Riverton “as housing and started looking at them as commodities.” Mr. Shultz and others estimate that there are as many as 100,000 overleveraged apartments in the city’s working-class neighborhoods.

“They mistook Harlem for Fifth Avenue and 79th Street,” Mr. Shultz said of the banks. “The only surprise is that it took this long.”