A judge has called for an inquiry into how a convicted prisoner on suicide watch came within minutes of trying to kill himself in court.

Kai Griffiths managed to smuggle a razor blade into the cells below Lewes Crown Court yesterday.

It was discovered only after he gave a letter to his barrister and asked him to pass it to the judge, who was about to sentence him for a knife-point robbery.

In the letter he made it clear that he intended to slash his own throat in the dock rather than face a lengthy prison sentence.

Defender Phillip Wakeham said he immediately alerted prison staff who searched the cell and discovered the blade.

Griffiths, of North Road, Portslade, looked ill and confused as he was brought up to be sentenced a few minutes later.

Judge David Rennie granted him permission to return to his cell but the defendant fell headlong down a flight of steps leading down from the dock.

It is not clear if Griffiths deliberately dived head first down the steps or if he suffered an epileptic fit and fell.

He was later seen by a doctor in the cells but did not appear to be seriously injured.

Griffiths, 26, was convicted on Friday of carrying out a brutal knife-point robbery on Brighton beach in July 2004.

Jamie Pearce, 25, who was also alleged to have taken part in the robbery, was cleared by the jury. However, Pearce is still awaiting sentence for a homophobic attack on the same beach a week later as thousands of revellers were in the city for the Pride celebrations.

Griffiths was brought back to court yesterday to be sentenced for the robbery and for escaping from Ford Open prison in June where he was serving four months for motoring offences.

Mr Wakeham, defending, said: "Throughout the trial I was aware that he was receiving threats and had been the subject of bullying at Lewes Prison."

Mr Wakeham said that as a result, Griffiths was moved to a singe cell in K-wing at Lewes prison, where sex offenders are housed. He said this had distressed Griffiths who had suffered sexual abuse when he was a teenager.

Mr Wakeham said that Griffiths had made attempts to harm himself in prison in the past and for the last two weeks had been on suicide watch.

Following the hearing, Judge Rennie called for a report from Lewes prison governor Eoin McLennan-Murray into the incident, adding "I am calling for a report ... explaining how a man who was effectively on suicide watch, and who threatened to cut his throat last Thursday, was able to smuggle a blade into court today with a stated view of harming or killing himself."

He ordered a psychiatric report on Griffiths, who will now be sentenced on February 2.

A Home Office spokesman said: "The governor will submit his report to the judge in due course."