Federal and city prosecutors are looking into last year's sale of the Brooklyn Heights Library in connection to an ongoing probe into Mayor Bill de Blasio's administration. 

U.S. Attorney Preet Bharara and Manhattan District Attorney Cyrus Vance are investigating the real estate developer Hudson Companies after it won rights to convert the library into a luxury condo tower, despite being outbid by two other companies.

The city struck a deal with Hudson Companies after it bid $52 million to transform the library into a 36-story condo building with a revamped library.

Another company, Second Development Services, bid $6 million more.

But sources say Hudson Companies' bid included more affordable housing units, a bigger library and a quicker completion time — making their offer more compelling.

The President of Hudson Companies has also donated nearly $10,000 to de Blasio's political campaign since 2007 and has had close personal ties to the mayor.

De Blasio has refunded more than $6,000 of that money.

A spokesman for de Blasio responded to our request for a comment with a statement, which reads:

"The RFP process for this project followed a strict protocol. Hudson Companies was awarded the contract meritoriously as its bid provided the best overall package for the library and the community at large, including the most affordable housing."