Harlem will soon get about 3,000 new units of affordable housing, thanks to a $100 million loan from Bank of America.

The bank will give the money to the city’s Housing Development Corporation in exchange for fixed-rate bonds.

Builders can get low-cost financing from the city and pass the savings on to the homeowner.

To qualify, families must earn between $40,000 and $157,000 a year, though a HDC spokesman said the average income of recipients would fall closer to $75,000.

“This is without a doubt one of the hottest residential neighborhoods in the city,” Mayor Bloomberg said during a press conference at 1825 Madison Ave., where some of the new units will be built. “The price of apartments here has skyrocketed.”

The $100 million loan will come from Bank of America’s $750 billion commitment to community development programs nationwide.