The saga of Starrett City has finally reached a conclusion.

New York Gov. David Paterson has signed legislation that will keep the Brooklyn housing complex affordable for the next 30 years. The deal allows the owners to refinance for substantially more than they owe on the existing mortgage, and pocket most of the difference.

The owners are allowed to do the cash-out refinancing provided they set aside at least $40 million in a reserve fund for improvements, and keep Starrett City in New York City’s Mitchell-Lama affordable housing program for the next 30 years.

“If this housing had left the Mitchell-Lama program, it could not be replaced,” said Rafael Cestero, commissioner of the New York City Department of Housing and Preservation and Development. “This is a great accomplishment, and one of which we can, as a community, be very proud.”

The legislation ends nearly three years of speculation regarding the fate of the 5,881-unit Starrett, the nation’s largest federally subsidized apartment complex. The owners, Starrett City Associates, had a deal in place in 2007 to sell the complex to Clipper Equity, LLC, for $1.3 billion. In announcing the deal, Clipper Equity stated its intention to take the property out of the Mitchell-Lama program.

Soon after, protests from groups ranging from grassroots tenant organizations to the highest offices of state government began. New York Mayor Bloomberg, Sen. Charles Schumer, and state Attorney General Andrew Cuomo all vowed to block the sale, and with the help of Alphonso Jackson, the Department of Housing and Urban Development secretary at the time, the transaction was blocked.

In response, Clipper Equity proposed a new deal wherein rents would reach market-rate levels after three years. That deal, too, was rejected. The owners continued to field bids throughout 2008, but took the complex off the block in February.