A sex attacker who slit his own throat while in the dock awaiting sentence has admitted taking a kitchen knife into a magistrates' court.
Lukasz Robert Pawlowski, 33, stabbed himself in the throat at Haverfordwest Magistrates' Court in Pembrokeshire, west Wales, on January 11.
On Monday he appeared at Swansea Crown Court via video link where the judge said there was no indication that he had intended to hurt anyone else with the weapon.
Judge Paul Thomas said he did not want to send Pawlowski to prison.
"Breaching court security is a serious matter," he said.
"The reality is he had already been punished for that; he had been in custody for the equivalent of a three-month sentence."
Of Pawlowski entering the court with the weapon, he added: "Why it (the knife) was not picked up is an entirely different matter."
Judge Thomas added that he needed a report on the defendant to assess why he did what he did but that "unfortunately" one could not be prepared for two weeks.
Witnesses were shocked when Pawlowski, of Bush Street, Pembroke Dock, started making "frantic jabs" at his neck after returning to the dock from going to the toilet.
A Western Telegraph reporter, who asked not to be named, was in the courtroom when the incident happened at around 10.20am and said she was not sure if the defendant had lost consciousness but "he did lose a lot of blood".
She said: "The defendant was in the dock for a sentencing hearing when he attracted his solicitor's attention to ask to be allowed to go to the toilet.
"He returned to the dock very quickly, remained standing then muttered something through the glass.
"Suddenly everyone in the courtroom turned as he made stabbing motions at his neck.
"I couldn't see what he had in his hand, but he made several frantic jabs at his throat.
"The alarm was raised and the clerk rang the emergency services while court staff rushed in to administer first aid."
Paramedics were called and Pawlowski was airlifted to hospital with what the ambulance service described as "serious" injuries.
The reporter added: "It was a surreal situation, and I think everyone was quite shaken, but the court staff were very supportive and professional throughout."
Pawlowski had previously pleaded guilty to sexual assault by grabbing and kissing a shop assistant.
Preseli Pembrokeshire MP Stephen Crabb tweeted: ''Disturbing news. No-one should be in a position to harm themselves or others in a courtroom.''
Pawlowski was remanded in custody to appear before the court for sentence on March 6.