The Supreme Court of Cassation in Italy ruled a homeless man who admittedly stole sausages and cheese was not guilty of theft because he was hungry and acted in accordance with his need for nourishment.

The ruling was based on a 2011 theft by Roman Ostriakov, a Ukrainian national, who entered a Genoa supermarket and stole sausages and cheese while paying for bread sticks. He was arrested by police after customers complained to the shop owner.

In 2013, Ostriakov was sentenced to six months in jail and fined $115. He appealed, but the court upheld that verdict.

Just this week, Italy’s high court overturned those earlier rulings.

“The condition of the defendant, and the circumstances in which the seizure of merchandise took place, prove that he took possession of that small amount of food in the face of an immediate and essential need for nourishment, acting therefore in a state of necessity,” the court ruled, United Press International reported.

Get the hottest, most important news stories on the Internet – delivered FREE to your inbox as soon as they break! Take just 30 seconds and sign up for WND’s Email News Alerts!

The General Prosecutor’s Office, meanwhile, had argued Ostriakov had never actually left the shop, so he could only be found guilty of attempted theft.

The case bears striking resemblance to an 1862 novel by Victor Hugo called Les Miserables in which the main character was sentenced to six months in prison in France for stealing food to feed his family.

Note: Read our discussion guidelines before commenting.