Phoenixfire

"Phoenixfire" is the ninth episode in the eighth season of Doctor Who, set in medieval Arabia circa 1192. It is regarded as part of a three episode story arc featuring the White Guaridan, along with Serpent's Tongue and Phoenixfire.

Synopsis
After encountering the White Guardian after a long time, the Doctor and his companions are sent from Manr after defeating the Mara to medieval Arabia, where King Richard and Saladin prepare to sign a peace treaty. But a fiery spectre in the shape of a phoenix continually intervenes, and when the Doctor realizes it is an alien energy form that has become trapped in a time eddy he must figure a way to undo all the damage before everything is destroyed.