The decision settled a legal action brought by HBG shareholders, who objected to the fact that HBG would not hold talks with Heijmans and Boskalis.
The court decision makes it almost certain that HBG will complete a deal with Ballast Nedam rather than Heijmans.
Heijmans said it would "take its time" to decide if it was going to make a new bid.
HBG has a £929m-turnover contracting business in the UK.