The Lloyds TSB Foundation for Scotland has won a £3.5m payout from Lloyds Banking Group after a long-running dispute.
The foundation filed a complaint against the bank with the Court of Session in Edinburgh in September 2010, complaining that it had changed the way it interpreted the covenant between the two organisations.
The bank had decided to cut the percentage of profits it gave to its four UK foundations because of the massive losses by the group after the banking collapse in 2008.
The Foundation for Scotland was unable to agree a new funding settlement with the group and was told in February 2010 that it would not receive any more funding from the bank once the existing covenant expired in nine years' time.
The foundation received £38,920 for 2010 under the agreement but said it should have received more than £3.5m.
In June 2011 Lord Glennie ruled against the foundation, but at the end of December three appeal judges overturned his decision and ordered the bank to pay it just over £3.5m
Mary Craig, chief executive of the Lloyds TSB Foundation for Scotland, said: "The decision is extremely welcome and it shows the trustees were right not to accept the original findings."
She said the decision had also helped give the foundation clarity on how the money it should receive from Lloyds Banking Group would be calculated in the future. She said it was entitled to 1 per cent of pre-tax profits.
A spokeswoman for Lloyds Banking Group said it was disappointed with the court’s decision and was "considering the implications, including whether to appeal this judgement.
"Lloyds Banking Group is proud of its track record as one of the largest corporate funders in the UK, including Scotland. Going forward, we will of course strive to have a positive working relationship with the foundation throughout the remainder of the partnership."