The State has been ordered to pay more than €32m to development company Durkan New Homes.
The decision by the Commercial Court follows the failure by the State to honour an agreement to hand over Harcourt Terrace Garda Station in Dublin as part of a land swap deal.
Durkan New Homes built 215 affordable homes for first time buyers during the height of the boom. It did so in return for getting possession of the garda station and the adjoining film censor's office.
Under the Affordable Homes Partnership, the houses and apartments were discounted by 47%.
It cost Durkan a return of more than €31m.
However, the garda station was not handed over and has still not been fully vacated.
The site at Harcourt Terrace was valued at €17.7m in 2006 but is now valued at €2.8m.
Durkan took the Minister for the Environment to court and the company's case was upheld by Mr Justice Peter Charleton this morning.
The judge ruled that Durkan New Homes paid its share of the contract in full.
The contract was broken he found and the money must be returned.
He said the State had agreed and accepted more than €31m for the Harcourt Terrace site. The payment of this sum through the discount on the sale of 215 homes could not render that sum anything other than repayable as a liquidated sum.
There could be no argument against the repayment of that money he found.
Almost €1m was agreed in special damages between the two sides and the question of interest is due to be looked at tomorrow.
A spokesperson for the Minister of the Environment has said Phil Hogan would have to examine the judgment before making any comment on it.