Mayor Bill de Blasio defended a controversial $173 million real estate deal with two notorious slumlord brothers, which involved one of the most powerful people in the Brooklyn Democratic Party.

Hizzoner would not even admit the transactional optics looked “awful” when asked about it Monday night during his regularly scheduled interview on New York 1.

“I just don’t feel that,” de Blasio told host Errol Louis. “We said we’re going to convert these buildings to permanent affordable housing and get these people [tenants] out of a situation that’s not so good.”

The city spent $173 million to buy the 17 buildings in Brooklyn and the Bronx, which were valued at just $50 million on the city’s tax rolls and independently evaluated to be worth $143 million.

The buildings were owned by notorious slumlord brothers Jay and Stuart Podolsky, who are the sons of the late Zenek Podolsky – himself a slumlord. The trio were so notorious in the 1980s, The Post dubbed them “terror lords.”

City Comptroller Scott Stringer slapped City Hall with a subpoena for documents after The New York Times revealed Brooklyn Democratic Party insider Frank Carone — who has helped de Blasio raise money — repped the Podolskys in the deal.

De Blasio argued the buildings were part of a larger plan from City Hall to purchase buildings owned by bad landlords and used to provide shelter for homeless New Yorkers into affordable housing.

“We attempted a negotiation with that threat [eminent domain] on the table and what became clear was that the actual market price was higher than we would have liked it to be,” de Blasio said defending the price tag. “We could spend three years in court and probably end up at this exact same number, why don’t we just get this done and convert it to affordable housing right away?”

He added: “It doesn’t matter who the lawyer is.”