A paedophile who was assaulted inside an Ayrshire courtroom has dodged jail for hoarding sick images of child abuse – including one of a girl being raped.

The attack on Blair Mullen inside a courtroom at Kilmarnock Sheriff Court was filmed and shared on social media.

Extra police were in attendance when Mullen appeared at the same court for sentencing after admitting possession of indecent photographs and videos of children.

The offence was committed at Mullen’s home address and elsewhere between February 9 and March 10 last year.

Mullen's solicitor said his client had been in a cocaine-induced psychosis at the time the horrific stash of pictures and videos was amassed.

The 26-year-old sex offender, full name Blair Andrew Milligan Mullen, also admitted taking, permitting to be taken or making the images on February 9, 2022. 

The description of the images provided in court is too graphic to repeat, but included one video, lasting 55 seconds, of a child being raped.

Police attended Mullen’s home address in Playing Field Road, Crosshouse, after receiving information that images had been downloaded from the router.

The procurator fiscal depute said: "At around 7.55am on March 10, 2022, police attended in possession of a  warrant. A search of the property recovered a tower unit. The accused confirmed he owned it. 

"Police Scotland’s cyber crime unit then attended the address for a forensic triage of the hardware, recovering child abuse images. 

"He was then arrested and conveyed to Kilmarnock police office making no comment." 

The still images and videos depicted boys and girls aged between 5 and 10 with adults and other children.

Mullen was attacked in the courtroom at Kilmarnock after making a brief appearance on September 7.

When he returned to court for sentencing on Monday, October 23, defence solicitor Neil McPherson said his client had initially appeared on a more serious solemn petition, before the matter was reduced to a summary complaint – at while point he pleaded guilty.

Mr McPherson said: “Speaking with Mr Mullen, and helpfully his parents, there seems to be some confirmation during the period that most of the time he was in a drug-induced psychosis.   

“He spent time accusing the neighbours of behaving in the manner he pleaded guilty to.  

“His position is not that he denies it, he denies remembering it. A significant amount of money was spent on cocaine."

Sheriff Murdoch MacTaggart told Mullen: “The offences you have pleaded guilty to are very serious and routinely result in people being sent to custody.   

“You are not going today, but I will impose as a direct alternative to custody a two-year community payback order with social work supervision and conduct requirements."

He was told he must engage in any alcohol and substance abuse councelling and mental health treatment directed by supervisors.

He must also not approach or speak to anyone under 18, unless it’s unavoidable in the course of daily life, and has been banned from owning more than one approved internet-enabled device.

Mullen must also notify his supervising officer of any internet passwords and must allow them to examine the device on request.

In addition he was banned from deleting or hiding his internet browsing history, and was told he must not be found in possession of any images of under-18s, of any kind.

Sheriff MacTaggart added: "These are the conditions you must comply with. You will be required to complete 120 hours of unpaid work.

“You will be subject to the reporting and registration requirments of the Sex Offence Act 2003 for two years.”

Mullen return to court for a community payback order review in three months.     

Police Scotland confirmed that two men were taken into custody following the incident at Kilmarnock Sheriff Court on Thursday September 7.  

Footage emerged on Facebook showing part of the incident inside Court 1. 

A 32-year-old man was arrested and charged in connection with the assault, and a 35-year-old man was arrested on suspicion of causing an obstruction.

At the time a Scottish Courts and Tribunals Service spokesperson said: “Any recording within the sheriff or justice of the peace courts requires the permission of the sheriff principal. 

“Anyone taking photographs or filming without prior permission may be found in contempt of court.” 

Read more on the Stevenston man who pleaded guilty to repeatedly punching the accused Blair Mullen in Kilmarnock Sheriff Court - exclusively in the Ardrossan & Saltcoats Herald next week.