Nobel Prize-winning economist Paul Krugman spoke in favor of Mayor Bill de Blasio’s controversial affordable housing plan at an event starring the two prominent liberals tonight.

Mr. Krugman noted that areas of the country with more relaxed zoning laws, allowing developers to build taller and denser, tend to have a lower cost-of-living than tightly regulated major cities. Mr. de Blasio’s proposals would waive some height restrictions and requirements that builders allocate new parking in exchange for requiring them to set aside apartments for below-market renters—with the aim of creating 80,000 new units of affordable housing.

“Because New York is such a high-productivity, such a desirable place, it can make deals. It can basically say, look ‘we will let you do a little bit more, let you go higher, let you go denser, but you have to build affordable housing. Which is what you’re trying to do of course,” he said. “We can have more people, we can have density that will make the city a better place and also make it a place that will be more affordable for more people.”

Mr. Krugman is known for his calls for greater government intervention in the economy and attacks on wealth inequality. He argued that those who seek to limit or stop development, even those looking to contain gentrification or preserve character, just limit supply and thus make the city more expensive—and thus more difficult for low-income people to remain in.

“When people, for whatever reason—for their neighborhood—when they oppose increased development and more housing, there are reasons for that, but they are also in fact imposing what we would call an ‘extra value. ‘They are imposing a cost, in some ways, on the rest of the population of New York,” Mr. Krugman said. “It is somewhat exacerbating the inequality. NIMBYism has some negative effect.”

Mr. de Blasio thanked Mr. Krugman for his support, and related how many of his supporters—including in the historically low-rise Brooklyn neighborhoods he once represented in the City Council—had balked when he called for increased development.

“Shockingly, some people said, ‘well, wait a minute, I want to help people in need, but I don’t want height and density,'” the mayor said. “To be real with people, we’re going to need a certain amount of height and density to actually achieve the kind of affordable housing we need.”