Mowlem Scotland was hired to design and construct the Quayside Health and Fitness Centre in Musselburgh complete with a 20-metre indoor pool.
But the facility sprung a series of leaks which eventually forced its owner to close the centre for two months and spend 400,000 on fixing the problems.
Now a judge has ruled that the pool operators, Musselburgh and Fisherrow Co-Operative Society, should receive a six-figure sum in compensation.
Mowlem completed work on the centre in 1992 but damage caused by the leaks began to surface seven years later.
In early 1999, pool officials complained that water was continually seeping into service ducts which had to be removed by pumps. Water entry led to the corrosion of the hot water supply pipe servicing the toilet and changing rooms.
Following the failure, an investigation by engineers was launched and defects in the construction of the pool came to light.
The Co-Op society launched its legal action in February 2002 when Mowlem admitted the blunders and its breach of contract.
But the firm's lawyers succeeded in time-barring some of the problems as more than five years had elapsed.
However, dampness was discovered seeping through the pool tank which one expert blamed on a failure to carry out proper waterproofing.
Staff were concerned that the leakages could damage the integrity of the pool walls and ordered repair work, which was carried out in May 2004.
At a hearing at the Court of Session, Lord Eassie said he considered that moisture was seeping through the tank as a result of inadequate waterproofing.
He found in favour of Musselburgh and Fisherrow Co-Operative Society because it would have been unaware of the seepage before the 1997 deadline for raising an action.
Officials had been seeking between 200,000 and 300,000 to cover the costs of the repair work.
Tom Lees, chief executive of the Musselburgh and Fisherrow Co-Operative Society, said it had not decided where the cash would be spent.
He said "We have just received the judgement and have not had time to look through the details." The centre, situated on the main A1 at the Fisherrow harbour and overlooking the Firth of Forth, has around 1500 private members who pay an annual fee.
Hundreds of swimmers use the pool every week and the centre's owners were forced to pay for its members to use a nearby East Lothian Council facility while the centre was closed.
Lord Eassie also took the loss of revenues from its cafe into account when working out the compensation bill.
The centre was opened to the public in May 1992 and is made up of three function suites, a bar and restaurant and leisure facilities.
The facilities include a leisure pool, spa, steam room, sauna, creche, treatment room, air- conditioned gym and an exercise studio.
The centre also provides facilities for conferences, seminars, training events and meetings.
Mowlem Scotland was contacted for a comment but failed to respond.