A homeless man sleeps next to his shelter by the Tiber river in Rome on March 14. (Max Rossi/Reuters)

Who can blame a homeless man for stealing a small amount of food from a grocery store? Certainly not Italy's Supreme Court.

Five years ago, Ukrainian national Roman Ostriakov was homeless in Genoa when he was caught stealing cheese and sausage worth less than $5, the Telegraph reports. He was fined $115 and sentenced to six months in jail in 2015, a sentence that he appealed. On Monday, the Italian Supreme Court ruled in his favor.

"The condition of the accused and the circumstances in which he obtained the merchandise show that he had taken the little amount of food he needed to overcome his immediate and essential requirement for nourishment," it ruled. "People should not be punished if, forced by need, they steal small quantities of food in order to meet the basic requirement of feeding themselves."

The Italian newspaper La Stampa praised the verdict in a front-page editorial.

"The court’s decision reminds us all that in a civilised country no one should be allowed to die of hunger," it read.

Corriere Della Sera noted in an opinion piece that statistics show the ranks of Italy's poor grow by 615 people daily and that it was "unthinkable that the law should not take note of reality," the BBC reports. The piece also took issue with how long the judicial system took to arrive at its final decision.

The ruling is "right and pertinent," Italiaglobale.it wrote in a piece. The decision is rooted in a concept that "informed the Western world for centuries — it is called humanity," it wrote, according to a BBC translation.

Ostriakov's appeal was based on different reasoning than that employed by the court. His lawyers argued that his sentence should only be reduced — from theft to attempted theft — because he was caught before he exited the store.