A man who refused to give evidence against the person he accused of robbing him at knife-point ended up being sent to prison for contempt of court.
Luke Richards had been due to testify against the man he said robbed him at his home in Haverfordwest, Pembrokeshire, in November last year.
But when the matter came to trial at Swansea Crown Court this week he refused to enter the witness box, forcing the prosecution to offer no evidence in the case and leading to the trial being abandoned.
Richards' refusal led to the judge finding the 23-year-old in contempt of court and sending him to prison.
The trial of the 25-year-old man accused of robbing Richards while armed with a knife and a bottle had been due to start on Wednesday, but the alleged victim did not turn at court and an arrest warrant was issued.
He appeared the following day but then refused to go into the witness box to give evidence, forcing the prosecution barrister Ieuan Rees to offer no evidence in the case, Wales Online reports.
Richards was found to be in contempt of court by Recorder Greg Bull KC who sent him into custody.
The Haverfordwest man reappeared before the recorder on Friday - this time in the dock - where he apologised to the court.
Recorder Bull asked the defendant if he had enjoyed his night in HMP Swansea , and Richards said he had not.
The recorder told him that failing to give evidence after making a complaint to the police was an "extremely serious matter", and he said the defendant's actions had cost the public purse a great deal of money and caused a lot of inconvenience.
He said he could lock Richards up for 28 days for contempt but he said he accepted his apology and he ordered his release.