A homeless couple who found €300,000 (£264,000) in an old Singer sewing machine while squatting in an abandoned building are on trial for money laundering after giving away some of the windfall to people who had helped them in the past.

The prosecution has accepted the couple, named only as Joey D, 32, and Kimberley A, 33, who are also facing charges of drugs possession, distributed the cash out of generosity.

However, the court in Ghent has heard from the prosecutor’s office that the money found in the house in the Flemish town of Assenede was not the couple’s to give away. The nine friends who received money are also being prosecuted.

The public prosecutor told the court: “They shared the money as well-wishers. But of course you cannot hand out money that is not yours. And the people who took the money should have known that Joey and Kimberley could not have come by such sums of money in a normal way.”

A lawyer for Kimberley, Sofie Vermeir, told the court her client had hoped the money would change the course of her life. She said: “They wanted to buy a house, because they know all too well that such shelter is the start of a normal life.”

The owner of the abandoned building is said to want the cash returned.

Jesse van den Broeck, acting for Joey, said his client was an “honest finder” and should be allowed to keep the cash.

“In the first hour procedural errors have already been made, so the investigation is void,” he said. “I ask that Joey get his money back and not be punished.”

The couple’s windfall was only discovered after the property of a friend with whom they were staying was searched during a drugs raid.

Officers found 1.5kg of speed (amphetamine) and more than 1,000 pills in the house, while Joey was found to have €50,000 in cash on him.

The prosecutor’s office is seeking 18-month suspended prison sentences and fines of €6,000 each for the couple. The judge is expected to give his decision in two weeks.