A bank manager carried out a £21m fraud on his employers as they named him business manager of the year.
Donald Mackenzie: Remanded in custody for a background report
Donald Mackenzie, 45, admitted at the High Court in Edinburgh to taking loans over five years up to March 2004 from the Royal Bank of Scotland by fraud.
The father-of-two had been employed as a business manager at the bank's Princes Street branch in Edinburgh.
A judge deferred sentence on Mackenzie for a background report, but rejected a plea he be allowed to remain on bail.
Mackenzie also pleaded guilty to stealing £37,170 between 15 May 2000 and 14 April 2004 while employed by the bank.
Lord Kinclaven told him: "Having regard to the nature of the matters before me I am satisfied that the appropriate course is that you be remanded in custody."
Advocate depute Alex Prentice said Mackenzie was caught after the RBS introduced a new loan guard computer system.
Information technology specialists found suspect data had been put in by Mackenzie, who had used his unique login identification.
They traced a series of "highly suspicious" transactions and Mackenzie's line manager was contacted.
Fraud squad detectives were called in and he admitted creating false loan accounts in names similar to those of genuine bank customers.
The advocate depute said: "What initially appeared to the bank to be a small number of anomalies did not just snowball but avalanched into a large complex scheme."
Mr Prentice said the bank had taken steps to recover money, but estimates its current losses from Mackenzie's activities at £10m.
Mackenzie, a first offender, of Belgrave Gardens in Edinburgh, was sacked in 2004.