A restaurant owner stole more than €16,000 from his ex-girlfriend and put the money on two horses at a local betting shop.
Raul Andrei appeared at Letterkenny District Court in Co Donegal charged with theft from his ex-partner when she was out of her home.
Andrei, aged 46, had invested €70,000 and opened up a franchise of Apache Pizza in Letterkenny which he ran for a number of months.
However, he developed a gambling habit after visiting a local casino close to his restaurant.
The court heard that on October 14 last while his partner was visiting friends in Dublin he gained access to the former house he shared with Oana Grigore at The Green, Ballymacool, Letterkenny.
He stole the money and then went to his local branch of BoyleSport Bookmakers.
He placed €10,000 on one horse and €6,720 on another horse at two different race meetings but both lost.
Solicitor Ciaran Haran said his client had lost a considerable amount of money the previous day and was trying to win the money back.
The accused told a friend that he had lost the money and was feeling suicidal as a result.
He also telephoned his ex-partner and told her what had happened.
He was later admitted to a psychiatric unit locally and received treatment.
Mr Haran said the money which the accused had stolen had come from the business and he had given it to his ex-partner.
The court was told that Ms Grigore had hidden the money as she was aware of the accused man's gambling habit.
Mr Haran said his client was very remorseful and that he had attended Gambler's Anonymous and was also attending church meetings and added that he no longer gambles.
Andrei has tried to pay back some of the money but the victim had refused the offer.
The couple has one child together and Andrei still pays his child's creche fees and sees the child regularly.
The court heard that the accused, of Sprackburn House, Letterkenny, is now working with a local company, earns €600 per week and is anxious to pay the money back to his ex-partner.
He has no previous convictions of any kind.
Judge Paul Kelly adjourned the case to June 24 for a probation and community service report and also a to get a victim impact statement.