Three appeal court judges have overturned a landmark 2010 judgment in favour of developer Derek Carlyle, who was threatened with bankruptcy after RBS withheld funds it had promised to complete a development.

The judges found that the bank's action "may have been contrary to the spirit of the negotiations prior to the signing of the written agreements, but that spirit, or its moral content, cannot be taken as creating a legally binding voluntary obligation".

The ruling undermines a £3 million counter-claim by Mr Carlyle against RBS, which had pursued the developer for a £2m personal guarantee. Soon after Mr Carlyle won the original Court of Session case in 2010, the bank was instrumental in his sequestration for a minor debt, prompting Labour MP Jim Hood to accuse the bank in the Commons of sanctioning "a personal vendetta by bank personnel" against his constituent.

RBS was subsequently active in submitting evidence which led to a record 12-year bankruptcy restriction order imposed on Mr Carlyle last year for spending asset sale proceeds, and it also objected to Mr Carlyle receiving legal aid to defend the appeal, for which the bank had originally appointed the Dean of Faculty as its QC.

Mr Carlyle commented on the judgement: "I take from these points that businesses in Scotland should now be aware that they should not expect trust or morals from their bank."

RBS said it was "pleased with the result" but could not comment further.

In the original judgement Lord Glennie said RBS had shown a "lack of candour" in its evidence that no promise to deliver complete funding had ever been given. He ruled that the bank had been wrong to withhold the final £700,000 development cost of the site at Gleneagles, after advancing £1.4m for buying land which the bank had been repeatedly told was subject to a buyback clause unless houses were built. Lord Glennie ruled that the bank had effectively created a "collateral warranty obligation", encouraging Mr Carlyle to proceed with the land deal in June 2007.

In the appeal court hearing last month, Mr Carlyle's QC Michael Howlin said the developer's unchallenged evidence showed that on previous projects the go-ahead for full funding had come "always in a phone call saying 'Edinburgh have approved it'", with paperwork produced only when money was drawn down. But for the bank, Alastair Duncan QC said to suggest such an "anodyne exchange" was legally enforceable was "commercially absurd".

In the appeal court judgement Lord Carloway, Lord Justice Clerk, says the court accepted that RBS commercial manager Helen Hutchison told Mr Carlyle complete funding had been sanctioned, "even if this does seem to this court to be somewhat improbable".

The judgement continues: "However, quite apart from the generality that major banks do not normally lend private individuals (or companies) millions of pounds.... without setting out the terms and conditions of such a facility in writing, the defender himself knew that, whatever had been said in oral discussions, the parties' obligations would have to be formulated in writing. Until that was done, the matter was, as the defender himself put it, a matter of 'trust'."

The judges accepted (which the bank had denied) "it may well be that, at that time, the pursuers fully intended to enter into a further bargain with the defender to advance additional funding for the building works". But that had not happened, and the oral promise "amounted only to a statement of future intention" and could not create a binding obligation.

The Lord Justice Clerk, sitting with Lady Dorrian and Lord Bracadale, had questioned the meaning of a "collateral warranty obligation", a term used in English but not Scots law.