The Valeyard

The Valeyard was the prosecutor during the Doctor's trial. He presented past events in the Doctor's life as extracts from the Matrix and used them as evidence of the Doctor's meddling in time and space. However, the Valeyard had secretly tampered with the Matrix extracts to show the Doctor in the worst possible light and steer the trial to a guilty verdict. The Master revealed that the Valeyard was actually a potential future version of the Doctor, acting on behalf of the High Council to cover up the Ravolox affair in exchange for getting the Doctor's remaining regenerations. (DW: Trial of a Time Lord)

Other references with the Valeyard

 * In one timeline, the Valeyard defeated the Doctor and went on to wreak havoc throughout time and space. (DWU: He Jests at Scars...)
 * The Emissary of Death was a story scripted for the unmade season 27 of the original run of Doctor Who. This story would have featured the return of the Valeyard, where he attempted to not only frame the Doctor for committing the Jack the Ripper murders, but also for breaking the laws of time by committing them two years early. The plot element of the Valeyard being Jack the Ripper would be reused in Matrix.