Dancing the Code

Dancing the Code is an original novel written by Paul Leonard and based on the long-running British science fiction television series Doctor Who. It features the Third Doctor, Jo and UNIT. It takes place before the Virgin Missing Adventure Speed of Flight, also by Paul Leonard.

Plot
The Doctor has built a machine designed to predict the future, and it shows the Brigadier murdering him and Jo. Unable to tell when this is destined to occur, the Doctor and Jo decide to stay apart. Jo is sent to the war-ravaged Arab nation of Kebiria, but upon arrival, she is immediately arrested and sent to a brutal political prison. And that's not all: deep in the North African desert, an alien infestation is rapidly growing and threatens to overrun the entire planet.