A vile Burnley troll launched a sick Facebook attack on tragic Alfie Evans as the tot was dying, a court was told.
Anthony Hirst referred to the Liverpool youngster as a "Scouse," and said his death would be "97 then after the Hillsborough 96".
His expletive- laden message, in response to contact from someone expressing sympathy for little Alfie's plight, was then shared on the social media site.
Other users were so outraged by the comments they called the police and Hirst was arrested.
The town's magistrates heard Hirst said he was depressed when questioned by police and he couldn't explain why he sent the message. He told a probation officer he sent the middle-of-the night reply "without thinking," and then went back to sleep.
The hearing was told the jobless 48-year-old has received threats after the message was shared and has had to flee his home.
Alfie, who was 23-months-old, died at the Alder Hey children's hospital in Liverpool in the early hours of April 28, five days after his life support was withdrawn.
The youngster had a rare degenerative brain disease and his parents had fought a long legal battle to try and get him further treatment. They had received support from around the world, including from Pope Francis.
Prosecutor Mrs Tracy Yates told the court Hirst received a message about the child, which included a candle image with the text.
The defendant replied: "**** Alfie the Scouse little **** let him die. That be 97 then after the Hillsborough 96. One less Scouse to worry about binlicking gob******." The message included three smiley face emojis.
Mrs Yates said the message was shared and viewed by Facebook users who found it offensive and contacted the police.
When police spoke to the defendant, he said he had deleted the message and Facebook account. She added: "He said he was depressed and not in the right frame of mind. He couldn't explain why he sent that message."
Miss Cathryn Fell, defending, told the hearing Hirst responded "completely inappropriately," to the message sent to him.
The solicitor continued: "He sent a message to one person. He has not put it on a public platform. Unfortunately, they have thereafter shared it with others and that's why it's effectively mushroomed."
Miss Fell said: "He says, 'I know it was wrong. It was stupid. I can't explain it. I'm sorry for what happened'."
The solicitor said Hirst had since had to move out of his home because of threats. She went on: "He's fully appreciated the effect it's had on people and it's affected him back."
A probation officer who interviewed the defendant said he had lost both his parents within the last couple of years and lost a child in 2010. She told the court: "He has been diagnosed with depression recently by his GP and has been medicated. His GP has referred him for some grief counselling. "
The defendant admitted sending by a public electronic communications network a message that was grossly offensive, on or between April 23rd and 26th.
The magistrates told him they found the message highly unpleasant. The chairwoman added: "It caused distress to a wide range of people."
Hirst, who is on benefits, received a 12-month community order, with a 20-day rehabilitation activity requirement and must do 40 hours unpaid work. The ex-bakery worker, who had no previous convictions, was also ordered to pay £85 costs and an £85 victim surcharge.