Jamie Milligan, 25, who posted a series of vile comments on Facebook, is now facing a possible jail sentence.

Milligan also made disgusting comments about missing girl Madeline McCann and made threatening remarks towards a friend during the disturbing online outbursts.

Mikaeel, three, passed away in January last year after being beaten by his mother, Rosdeep Adekoya, 35.

Tests revealed that Mikaeel passed away on the night of January 14 last year and his body was found on January 18.

On January 17, Milligan, took to Facebook where he made the sickening comments.

Paisley Sheriff Court heard that Milligan, who suffers from Asperger’s syndrome, which is a form of autism, wrote the extremely offensive remarks on his Facebook page.

Maureen McGovern, prosecuting, told the court that several people on Milligan’s friends list then “voiced their displeasure” at his comments.

He replied: “I’ve been done for a recall and got off with it so f*** the system.

“I don’t care if the polis see this tbh, f*** them.” When a female Facebook user replied “so many twisted people out there”, Milligan said: “F*** it I battered my maw and I’ve battered my ex bird.

“My gran as well, I used to give her abuse and batter her when she was ill.” Again a woman expressed her disgust at Milligan’s comments and he went on to make sexually explicit comments about Madeline McCann that we have chosen not to print because they are so harrowing.

Milligan later posted comments saying he was only joking.

Several complaints were made to Police Scotland and, on January 21 last year, Milligan was arrested and charged.

When interviewed by police about his comments, the court heard, Milligan broke down in tears and “sobbed uncontrollably.” He told officers: “I know it’s wrong. I’m not on Facebook anymore, I’ve shut it down”.

When he appeared in the dock he pleaded guilty to two charges of behaving in a threatening or abusive way by posting offensive comments on Facebook.

The first charge related to racist remarks he made about the death of Mikaeel Kular, while the second charge was for threatening to rape the woman who told him his comments were disgusting.

Milligan was supported in court by an appropriate adult — someone who makes sure the person in question understands the legal process.

Sheriff Tom McCartney called for Milligan to be assessed by social workers ahead of sentencing and adjourned the case until next month.

Adekoya was sentenced to 11 years’ imprisonment after she admitted killing Mikaeel and hiding his body.

Madeleine McCann went missing from a holiday apartment in Portugal on Thursday, May 3, 2007.