The ruling came in a dispute between Braes of Doune wind farm, based near Stirling in Scotland, and contractor Alfred McAlpine.
Braes had signed an engineer, procure, construct (EPC) contract with Alfred McAlpine to build 36 wind turbines.
The contract overran because a separate contract between turbine supplier and the client was delayed.
Braes sought redress for the delay from Alfred McAlpine through the liquidated damages clause of its contract.
Under the contract Alfred McAlpine would have initially had to pay liquidated damages of £642 for each megawatt of capacity which is unavailable after the agreed completion date.
Dundas & Wilson construction law expert Hamish Lal says liquidated damages clause are important.
"They set financial boundaries for both parties. For the employer, he knows what he will be paid if there is a delay, and the contractor knows the limits of his liability."
But Lal says that liquidated damages cannot be claimed if a third party not connected with the contractor is responsible for a delay.
Alfred McAlpine refused to pay and Braes went to court to claim the money.
Mr Justice Akenhead ruled that the liquidated damages clause was unenforceable in this case.
"The contractor could end up paying liquidated damages for delays caused by the wind turbine contractor's defaults," he said and found against Braes.
"But in this case, McAlpine was potentially being penalised because the delays were not its fault," he said.
"The substantive point is that these clauses need to work and must cover the whole range of delays that may be caused," he said.