The man, identified as Usama Abdu, initially claimed that he had beaten his child because he had refused to wash, but later conceded that he was trying to blackmail his estranged wife into joining him in Greece. Initially appearing without a lawyer because no member of the Bar Association would represent him, the presiding judge had some harsh words for Abdu before sentencing him on Friday, politischios.gr reported.

“How a man can love his wife and not love the child this woman bore him? With what kind of heart did he do this? From what is this man made?” Judge Maria Tompazis asked the defendant. Abdu, in turn, offered up “a thousand apologies.”

The complaint against Abdu was initially made by the Smile of the Child charity, which reported the video of the beating that was circulating on social media to the police. The man and his son had been staying at the Souda refugee camp since arriving in Greece on October 16. It is believed that the boy’s mother is still in Turkey, along with their other child.

Doctors and a psychologist who examined the child said there were no signs of prolonged abuse or anything requiring hospitalization, and the boy has been moved to a hostel for unaccompanied minors run by the NGO Metadrasi.

It was initially reported that Abdu may have been connected to Islamic State (IS, formerly ISIS/ISIL), though photos on social media showing him holding weapons were actually captioned ‘Rebel Free Syrian Army’ and the allegations could not be independently verified.

Greece has borne the brunt of the Syrian refugee crisis due to its proximity to the Middle East and Turkey. Although the flow of asylum seekers has slowed since the EU struck a deal with Turkey, many asylum seekers have been left stranded on the Greek islands, which has exacerbated tensions with locals. In a report released in October, Doctors Without Borders condemned the conditions in Greece’s refugee camps, calling them “appalling.”