One of the men accused of being involved in the Hatton Garden jewellery raid took part to pay off debts of more than £20,000, it was alleged.
Carl Wood, 58, owed thousands of pounds in credit card debts, loans and money to a friend and was "living on the breadline", Woolwich Crown Court heard.
But he missed out on a massive payday from the "largest burglary in English legal history" after pulling out of the heist part way through when the gang ran into trouble, prosecutors suggested.
Wood is accused of being "Man F" in CCTV footage of the Easter weekend burglary this year, but is said to have walked away from the job on the night of April 4, two days in, after finding a fire escape door closed.
On April 7, straight after the jewellery raid over Easter weekend this year, Wood, from Cheshunt, Hertfordshire, rang debt advisers to try to sort out his financial situation.
The court heard he owed almost £9,000 to Barclays, more than £3,000 to NatWest, up to £2,000 for a Christmas loan and almost £9,000 to a friend.
Addressing Wood's difficulties, prosecutor Philip Evans said: "You have told us you are a family living on the breadline, living off disability allowance, other bits of work."
He added: "Your debt situation, I suggest that was your motive for committing these offences."
Wood replied: "No, it wasn't."
The court heard that Wood phoned Barclaycard on April 2, two days before the raid began to get advice on the money he owed.
Mr Evans suggested that the calls provided no solution to his problem.
He added: "On April 7, your hopes that your problems were going to be cured by your profits from the Hatton Garden burglary raid had disappeared.
"That is why on April 7, the first working day back, you were on the phone to both of your most significant debts to make arrangements to pay £1 a month. That is right, isn't it."
Wood replied: "That is your suggestion."
Wood, of Elderbek Close, Cheshunt, Hertfordshire, is charged with conspiracy to commit burglary, and one count of conspiracy to convert, conceal or transfer criminal property.
Ringleaders John "Kenny" Collins, 75, Brian Reader, 76, Daniel Jones, 60, and Terry Perkins, 67, have pleaded guilty to conspiracy to commit burglary at Hatton Garden Safe Deposit between 17 May 2014 and 7.30am on April 5 this year.
William Lincoln, 60, of Winkley Street, Bethnal Green, east London; and Jon Harbinson, 42, of Beresford Gardens, Benfleet, Essex, are on trial accused of the same offence.
A fourth man, plumbing engineer Hugh Doyle, 48, of Riverside Gardens, Enfield, north London, is jointly charged with them on one count of conspiracy to conceal, convert or transfer criminal property between January 1 and May 19, this year.
He also faces an alternative charge of concealing, converting or transferring criminal property between April 1 and May 19, this year.
One of the thieves, a red-haired man known only as Basil, has not yet been identified.
Collins of Bletsoe Walk, Islington; Jones of Park Avenue, Enfield; Perkins of Heene Road, Enfield and Reader of Dartford Road, Dartford, are due to be sentenced at a later date.
The court heard that Wood would talk about his debt problems with Jones, a long-standing friend of 30 years, who has admitted being part of the heist and hiding his share of the loot.
During his cross-examination, Mr Evans told Wood: "He knew that you were a man who didn't have two pennies to rub together.
"You knew that Mr Jones was busy stashing his jewellery in a cemetery. One or two of those rings, if you had sold those, could have paid off your debt."
Wood replied: "They're your words."
Mr Evans said Jones had "taken (Wood) into his trust" after telling him he was taking part in something that involved a lot of money, and that if he had given him a couple of rings from the heist, "all your problems are gone".
But Wood said that Jones would not "borrow or lend anything", saying he "buys his clothes out of Oxfam".
He said: "Danny Jones is renowned that he wouldn't sleep if it cost him a penny ... he certainly wouldn't give me anything."
But Mr Evans said Jones didn't give Wood any of the proceeds from the heist because he had lost his bottle and bailed out half way through.
He said: "That is why Mr Jones didn't give you a single penny. He wouldn't give you a single ring to help you with your debts, would he?
"And that is the reason, because you bailed out, didn't you."
Wood answered: "I don't know, it wasn't me."
Mr Evans went on: "That is why police didn't find anything at your house - because they didn't give anything to you."
After the raid, Jones and fellow gang member Perkins were recorded on police surveillance saying that "Carl" must be "cursing himself", and must be thinking of "committing suicide", Mr Evans said.
He asked him: "That 'Carl' - that is you, isn't it? They are talking about you being in debt and you walking away from the Hatton Garden burglary?"
Wood replied: "Where does it say that?"
Wood, who has Crohn's disease and was dressed in a brown jumper, white collared shirt and dark trousers as he gave evidence, also told the court he spent the evening of the heist on April 4 having a barbecue at home with his wife, daughter and grandchild.
He had invited Jones to join them, he said, but he pulled out at the last minute, with Jones telling him: "That thing I was talking about before is happening ... just keep watching the telly and you'll see it."
When the news emerged of the raid he said he suspected Jones was involved as he knew what he was capable of because of his long list of criminal convictions.
He said: "I had semi-convinced myself that Danny was involved and I didn't really want to have any contact with him.
"On Danny's side he was obviously busy, I assumed, and that is why he didn't have any contact with me."
But he said he didn't go to the police as he couldn't be sure it was Jones and that he was "a friend".
Wood was arrested in May but when he was interviewed by police he refused to comment, on the advice of his solicitor, adding that he had not wanted to "put (Danny) in a position".
When asked by Mr Evans why he did not tell police of his alibi, that he had been at home on the evening of the heist, he said he "wasn't well" and "wasn't thinking straight".
Throughout his evidence Wood was repeatedly evasive, saying he could not remember dates, the details of conversations, where he had been on particular days or why he had been at certain places at particular times.
At one point he claimed to have such a poor memory that he could not remember when he had got married - only that it was "when they stopped giving the yearly renewable passport out" - or his daughter's birthday.
But Mr Evans put it to him that he was simply trying to hoodwink the jury, saying: "You are making you evidence your evidence up as you go along, you are lying to this jury, aren't you?"
Wood, who denies the allegations against him, replied: "No, I am not."
The trial continues tomorrow.