A Lancashire man who posted offensive comments on Facebook about missing five-year-old April Jones has been jailed for 12 weeks.
Matthew Woods, 20, made a number of derogatory posts about April and missing Madeline McCann.
He appeared at Chorley Magistrates' Court where he admitted sending a grossly offensive public electronic communication.
Woods, of Eaves Lane, Chorley, was handed the maximum sentence.
Chairman of the bench, magistrate Bill Hudson, said his comments were so serious and "abhorrent" that he deserved the longest sentence they could pass, less a third to give credit for his early guilty plea.
Mark Bridger, 46, appeared before Aberystwyth magistrates earlier charged with April's murder.
He is also charged with child abduction and attempting to pervert the course of justice.
'Author of own misfortune'
Woods, who is unemployed, was arrested for his own safety on Saturday night and remanded in custody ahead of his appearance in court.
Chorley magistrates heard members of the public were so upset about his posts they reported them to the police.
About 50 people went to his home. He was arrested at separate address.
The court heard his comments mentioned April, who went missing last week from near her home in Machynlleth, Powys, and Madeleine McCann, who vanished five years ago from her family's holiday apartment in Praia da Luz in Portugal.
Martina Jay, prosecuting, said: "When interviewed by police he fully admitted he posted messages about the two missing children."
She said he had been drinking at a friend's house when he saw a joke online and changed it slightly before posting it on Facebook.
"He said he did it in a bid to make people think his account had been hacked. He said it got out of hand," she said.
Woods conceded to police that his account had not been hacked and that he was responsible for all the posts made on 3 and 4 October.
David Edwards, for Woods, said: "He did seem genuinely remorseful and regretful for what he had done.
"At the time he posted these comments not once did he think he would find himself where he is today.
"He fully accepts he was the author of his own misfortune."
Sentencing Woods, Mr Hudson said: "The words and references used to the current case in Wales and that of the missing girl in Portugal are nothing less than shocking, so much so that no right thinking person in society should have communicated to them such fear and distress.
"The reason for the sentence is the seriousness of the offence, the public outrage that has been caused and we felt there was no other sentence this court could have passed which conveys to you the abhorrence that many in society feel this crime should receive."