A man who posted "despicable" comments on his Facebook page about missing youngster April Jones has been jailed for 12 weeks.
Matthew Woods, 19, from Chorley, Lancashire, made a number of derogatory posts about April and missing Madeline McCann after getting the idea from Sickipedia - a website that "trades in sick jokes".
Among his comments were: "I woke up this morning in the back of a transit van with two beautiful little girls, I found April in a hopeless place."
Another read: "Who in their right mind would abduct a ginger kid?"
Others stated "I love April Jones" and "Could have just started the greatest Facebook argument ever. April Fools, Who Wants Maddie?"
He also wrote comments of a sexually explicit nature about the five-year-old who went missing last week from near her home in Machynlleth, mid Wales.
Chorley Magistrates' Court heard members of the public were so upset about his postings that they reported them to the police.
A "vigilante mob" of around 50 people later descended upon his home address in Eaves Lane and the defendant was arrested on Saturday night at a separate address for his own safety.
Martina Jay, prosecuting, said: "When interviewed by police he fully admitted he posted messages about the two missing children.
"He started this idea when he was at a friend's house when drinking, saw a joke on Sickipedia and changed it slightly.
"He said he did it in a bid to make people think his account had been hacked. He said it got out of hand and he was drunk while doing it."
He conceded to police that his Facebook account - available to a large number of people - had not been hacked and that he was responsible for all the postings made on October 3 and 4.
Unemployed Woods entered a guilty plea to sending by means of a public electronic communications network a message or other matter that is grossly offensive.
After meeting his client for the first time, defending solicitor David Edwards told the bench: "What struck me immediately is that the enormity of what he has done has finally sunk in.
"He did seem guinenely 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 said Woods got the idea for the posting from Sickipedia "which basically trades in sick jokes".
Mr Edwards added: "He started receiving derogatory replies almost immediately and then came threats.
"The reality is that before long a number of people realised what he had done and sought him out."
The solicitor said Woods explained what had started as a joke had gone wrong.
"He realises this will have a profound effect on him," he continued. "With the publicity that has followed he will be known as the man who made these comments on Facebook.
"He has to live with this because of his stupidity.
"His future is uncertain. He does not know whether he can go back to his home address.
"He fully accepts he was the author of his own misfortune.
"Nothing like this is going to happen again. He appreciates what he has done and puts himself at the mercy of the court."
He asked for a community service order to be considered but the bench was told that custody could be imposed for anyone who is convicted of using extreme language that causes substantial distress or fear to another.
The bench asked for a pre-sentence report from a probation officer and said it would keep all options open ahead of sentencing, which is set to take place from 2pm today.
Undated handout photo issued by Dyfed-Powys Police of April Jones who was abducted while out playing near her home
Detective Superintendent Reg Bevan during a press conference in the Welsh Government Building in Aberystwyth Ceredigion
Police at the home of Mark Bridger, as the hunt for missing April Jones continues around Machynlleth, mid Wales
Villagers walk to Sunday church service at St Peter's Church in Machynlleth
Villagers walk to Sunday church service at St Peter's Church in Machynllet
A Sunday church service at St Peter's Church in Machynlleth and prayers for April Jones, held by Reverand Kathleen Rogers and Bishop of Bangor Andrew John
A Sunday church service at St Peter's Church in Machynlleth and prayers for April Jones, held by Reverand Kathleen Rogers and Bishop of Bangor Andrew John.
Close up a an order of service
A Sunday church service at St Peter's Church in Machynlleth and prayers for April Jones
Police officers stand outside the entrance of Aberystwyth Police Station where Mark Bridger is being held after it was announced that he has been charged with the abduction and murder of missing schoolgirl April Jones
Left - right) District Crown Prosecutor from the Crown Prosecution Service Iwan Jenkins, Dyfed-Powys Police Chief Constable Jackie Roberts and Dyfed-Powys Police Superintendent Ian John attend a press conference Aberystwyth, where it was announced that Ma
A specialist search dog rides on a boat on the River Dyfi as the hunt for missing April Jones continues around Machynlleth, mid Wales
Forensic officers search the home of Mark Bridger - who has been arrested on suspicion of murder - as the hunt for missing April Jones resumed in Machynlleth
Superintendent Ian John holds a press conference into the missing 5-year-old April Jones
Police divers search the river Dyfi in Machynlleth, Mid Wales, for missing five-year-old April Jones, who was last seen willingly getting into what is believed to be a Land Rover Discovery on the Bryn-y-Gog estate where she lives at 7pm on Monday
A roadside poster in Machynlleth for missing April Jones,