A man has been jailed for two and a half years for dangling a baby boy out the window of a high-rise building to generate social media reaction.
The man posted a picture of himself holding the baby out the window with the caption: "1,000 likes or I will drop him".
He was charged with endangering the baby's safety following his arrest on Sunday, police said.
The man, who is believed to be a relative of the child, dangled the baby out of the 15th-floor window of an apartment block in Algiers, news site Al Arabiya reported.
The image, which was shared on Facebook, generated social media users to call for the man's arrest.
The child's father urged the court to forgive the man, saying he had just been playing a game.
However, the judge ruled against him, saying the child's life was in danger.
The man has been sentenced to jail for two and a half years.