A trader accused of Britain's biggest fraud was allegedly trying to cover millions of pounds worth of losses incurred during the financial crisis for the bank he called his "family", a court has heard.
Kweku Adoboli, 32, is accused of gambling away £1.4bn while working as a trader for Swiss bank UBS.
At one point, he was at risk of causing the bank losses of $12bn (£7.5bn), jurors at Southwark Crown Court were told.
Adoboli wept as he gave evidence for the first time at his trial, in which he claimed his off-book trades were to cover $40m (£24.9m) annual losses of his portfolio of companies from 2008.
The court heard that by 2007 Adoboli, aged just 27, and more senior trader John Hughes, 25, were in charge of a portfolio of companies with assets of $50bn (£31.1bn).
"Our book was massive. A tiny mistake led to huge losses. We were these two kids trying to make it work," he said.
Mr Adoboli, wearing a dark suit and red tie, denied he was a "gambler" and said his knowledge of UBS's systems did not result in "fraudulent behaviour".
Fighting back tears, he said: "It's hard to find the words to describe the relationship I had with UBS as an organisation. It isn't about a bank. It was about what I thought was my family, considering how much (I) neglected my real friends and family.
"Every single bit of effort I put into that organisation was for the benefit of the bank, the people around me and the book I worked on.
"If I was not so proud to work for UBS, I would never put so much effort trying to convince them that we could achieve something at this bank."
He added: "To find yourself in Wandsworth Prison for nine months because all you did was work so hard for this bank..." before stopping as he broke down in tears.
Mr Adoboli is facing two counts of fraud and four counts of false accounting between October 2008 and September 2011, allegedly gambling away the money on high-risk illegal trades aimed at boosting his annual bonuses and job prospects.
The former public schoolboy worked for UBS's global synthetic equities division, buying and selling exchange traded funds (ETFs), which track different types of stocks, bonds or commodities such as metals.
Ghanaian-born Mr Adoboli enjoyed a rapid rise at UBS after completing an internship while a student at Nottingham University in 2002, the court heard.
Mr Adoboli told the court he feared UBS would not survive $52bn (£32.3bn) losses incurred in 2007-08 as the banking crisis took hold.
He said: "The effect on the organisation was incredible. There were times we thought there was no way the organisation would survive. I grew up with UBS. I felt very loyal to UBS.
"What could we do to help this organisation survive this incredible crisis?"
The trial continues.