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 to 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 Ravalox affair in exchange for getting the Doctor's remaining regenerations.

Other versions of the Valeyard
In one timeline, the Valeyard defeated the Doctor and went on to wreak havoc throughout time and space. (He Jests at Scars...)