A lucky German left almost €40,000 (£36,000, $47,000) of gold bars and cash under a tree in Berlin but was reunited with the hoard after a fellow citizen handed it in to the police.

The owner left 22 gold bars – weighing just under a kilo in total – and €3,500 in notes in a folder after locking up their bicycle in Neukolln district on the way to visit the bank on Thursday (27 July). The price of gold is currently €35,000-per-kilo.

Disaster struck when they got to the bank and realised they had left the folder next to their bike – in plain sight in the middle of the German capital.

Luckily, the folder was picked up by a very honest person, who handed it straight into the police.

Luckier still, the folder also contained personal items, which police then used to track down the grateful owner.

Berlin Police revealed the episode in a tweet along with a photo of the money and pristine gold bullion.

The finder will not go empty handed. German law dictates that people who hand lost valuables into the authorities are entitled to between 3% and 5% of the haul – meaning the Good Samaritan could receive almost €2,000.

However, anyone who feels their faith in humanity being restored by this tale should not get carried away. Berlin Police were quick to point out that it would have been a criminal offence not to hand the goods in.

Not handing in high-value items or cash to the police is regarded as theft in German law and is punishable with up to three years in prison.

In fact, most countries around the world have similar laws. Cambridge University law professor John Spencer explained the legal reality of the "finders keepers, losers weepers" myth to the BBC in 2009.

Berlin gold bars lost
Berlin Police

If you find money in the street you should go to the police provided that it was reasonable to assume that the owner might be found.

"If you pick up a £1 coin, you can keep it unless you saw someone drop it, as you would not be able to find the owner by taking reasonable steps," he said.

"But if you found four or five £20 notes in a gutter – as I once did – you probably will find the owner as they are likely to contact the police, as they did in my case.

"You are only guilty of theft if you appropriate the property of another. If someone has abandoned it, the property is yours.

"For example, if I throw something away in the street and someone else picks up the litter, that is not theft," he added.

Under the Theft Act 1968, a person is guilty of theft if they "dishonestly appropriate property [including money] belonging to another". Property will continue to "belong to another" unless it has genuinely been abandoned by the owner rather than lost accidentally.