A man who held a child out of a 15th-floor window in order to gain Facebook Likes has been sentenced to fifteen years in prison.

Algerian man, who has not been named, posted pictures of his youngest baby cousin being dangled out of the window in an apartment block in Algiers, Algeria, with a single hand gripping the back of his t-shirt.

“1,000 likes or I will drop him”. Facebook users who saw the post called for him to be arrested for child abuse, reports Al Arabiya, and he has since been charged.

The child abuser, denied he put his life at risk, saying the image had been altered by social media users, Algeria’s privately owned Ennahar TV reported.

He was charged with endangering the baby’s safety following his arrest, police said.

“The picture was taken in a balcony with protective barriers,” he said, according to Ennahar TV. “These were removed.” The child’s father also called for the court to forgive the man, arguing that he had simply been playing a game.

The judge, however, ruled that he had put the child’s life in danger. Articles shared on social media about the incident got thousands of mostly angry reactions.

Many Algerians insulted the man, and praised the authorities for arresting him and sentencing him, she adds. Earlier reports incorrectly described the convicted man as the child’s father.