A prison officer is under investigation after a prisoner from Barking accused of murdering an inmate saw the anonymous star witness “through a crack in the door”, plunging the case into crisis.

It can now be reported that Basana Kimbembi had identified Bobby Dorset as the witness during the trial where he was accused of stabbing to death 21-year-old Jamal Mahmoud in Pentoville Prison.

To protect his identity, Bobby spoke through a Darth Vader-style voice modulator from behind a screen in Court 10 of the Old Bailey.

But after less than an hour in the witness box, the trial was halted when it emerged that he had been identified by Kimbembi.

The Congolese immigrant had been standing behind the door to the dock when it was opened by a prison officer while Dorset was still in court with a sound technician.

On being told his cover had been blown, Dorset expressed concern for his safety and that of his family and refused to carry on.

The full circumstances in which Dorset was identified can only now be told after the Press Association applied for a temporary ban on reporting legal discussion in the absence of the jury to be lifted.

Kimbembi and his two co-accused, Joshua Ratner and Robert Butler, were later cleared of Mahmoud’s murder at the end of a trial lasting nearly three months.

On Monday, Kimbembi was jailed for 12 years after the jury found him guilty of wounding Mahmoud’s friend, Mohammed Ali, 22.

Dorset had allegedly witnessed Mahmoud rowing with Kimbembi about a smuggled parcel of phones and drugs the day before he was stabbed to death.

He also told investigators he had seen Kimbembi stab Mahmoud in the stomach but never gave his evidence to the jury about it.

At a brief hearing today, Deanna Heer said the prosecution did not oppose lifting the temporary banning order.

She said: “The court can be satisfied that the anonymity order remains in place that will protect the identity of Bobby Dorset.

“As far as the disciplinary proceedings against the prison officer are concerned, his name was never mentioned in court and therefore is not capable of being reported.”

A Prison Service spokesman said: “An investigation is ongoing, it would be inappropriate to comment further.”