A sales adviser who made a series of depraved sexual comments about five-year-old April Jones on Facebook has been given a suspended prison sentence.

Magistrates in Worcester chose not to jail Sam Busby despite being told that another Facebook user was sentenced to three months in prison for an "almost identical" offence last month.

Busby, 18, was arrested after posting offensive remarks on the site on the day a man was charged with April's murder, five days after her disappearance in Machynlleth, mid-Wales.

The prosecutor Kerry Lovegrove told the court that Busby's initial post on Facebook was a "joke" about the missing girl obtained from another website. Other Facebook users urged Busby to stop writing inappropriate comments, and when he went on to make sickening claims about April, a woman contacted West Mercia police.

Busby, of Worcester, admitted he was responsible for the comments and told officers he thought they could only be seen by his friends on Facebook.

Lovegrove told magistrates: "He told the police that he was an immature teenager and it was an attempt to get some attention. On 8 October in Chorley [in Lancashire] a man was given 12 weeks for an almost identical offence where comments were made about April Jones."

Busby pleaded guilty last week to a charge of sending an indecent and offensive message brought under the Communications Act 2003. His solicitor, Belinda Arris, said Busby was now likely to lose his job. "He's so, so sorry. He has closed down his Facebook account and no longer engages in any social networking," she said.

Passing a six-week jail term suspended for 18 months, magistrates said they had taken into account Busby's early guilty plea and remorse.

The chairman of the bench, Gill Porter, told the teenager: "You will realise by the time we have taken to discuss this matter how seriously we view it. You have caused an immense amount of distress, not only to the recipient of this but potentially to April Jones's family and friends.

"It happened at a very sensitive time for everybody concerned. You were warned by your friends when they first saw your so-called joke, but you took no notice and you continued to make further even more offensive comments."

Busby, who left the court with his face covered, was also ordered to pay an £80 victim surcharge and keep to a 7pm-7am curfew for eight weeks.