Impoverished Italians who end up stealing small amounts of food because they’re hungry are not committing a crime, the country’s highest court has ruled.

The Supreme Court of Cassation overruled a theft conviction against Roman Ostriakov, a homeless Ukrainian, who stole cheese and sausages worth €4.07 ($4.50) in 2011. Ostriakov was caught by another customer in the supermarket and convicted of theft; he was ordered to pay a €100 fine and sentenced to six months in jail in 2015. The judges wrote:

The condition of the defendant and the circumstances in which the merchandise theft took place prove that he took possession of that small amount of food in the face of the immediate and essential need for nourishment, acting therefore in a state of need.

Ostriakov’s lawyer had initially tried to get his sentence reduced from theft to attempted theft, as Ostriakov hadn’t left the shop when he was caught. Luckily for Ostriakov, Italy’s high court does not focus on individual cases, but instead reviews how the law is applied.

“For the judges, the right to survival has prevailed over the right to property,” Massimo Gramellini, an editor at La Stampa newspaper, wrote in an opinion column (link in Italian), adding the court’s judgment “reminds everyone that in a civilized country, not even the worst of men should starve”.

Italy was one of the worst affected in Europe by the financial crisis. The poverty rate had hit a 16-year high in 2013, with poverty deepening in all areas of Italy between 2011 and 2012. An estimated 30% of the population was living below the poverty line in 2012, compared with the UK’s 15% and Spain’s 20%.

It’s proximity to the Mediterranean also means that it has been on the frontline of Europe’s overwhelming migrant crisis, further straining the country’s resources.