Sir Reginald Styles, a British diplomat trying to organise a peace conference to avert World War III, is in his study at the government-owned Auderly House when a soldier dressed in grey camouflage and wielding a futuristic looking pistol bursts in and holds him at gunpoint. However, before the guerrilla can fire, he vanishes, leaving Styles to shakily tell his secretary he has been visited by a ghost. As the conference is of vital international importance, UNIT is called in. The Chinese have pulled out of the conference and Styles will be flying to Peking to try to persuade them to rejoin, and nothing must interfere with the conference's success. However, when the Third Doctor, Jo and the Brigadier go over to Auderly House, Styles denies ever seeing the "ghost", even though the Doctor notes the presence of muddy footprints in the study.
The guerrilla reappears on the grounds in a vortex-like effect, but he is intercepted by two huge humanoid aliens, Ogrons, who attack him and leave him for dead. UNIT soldiers discover the severely injured guerrilla and take him to the hospital while the Doctor examines his weapon and a small black box that was found in a nearby tunnel system. Styles leaves for Peking, while the Doctor discovers that the pistol, which is an ultrasonic disintegrator, is made of Earth materials, not alien, and that the box is a crude time machine, complete with a miniature dematerialisation circuit. As he tries to activate it, the vortex effect appears again and the guerrilla vanishes from the ambulance. The temporal feedback circuit on the time machine also overloads — as the Doctor explains to the Brigadier, it has blown a fuse. Since everything seems to be centred on Auderly House, the Doctor decides to spend the evening there.
The night passes without incident, but in the day, three guerrillas appear from the time vortex — Anat, a woman who is in command of the mission, along with two men, Boaz and Shura. They come across a UNIT patrol and disintegrate the two soldiers while making their way to the house. In the study, the Doctor tries to reactivate the time machine, causing an alert to be sounded in the 22nd Century. Shura enters the house, but the Doctor subdues him with some Venusian karate. Shura begs the Doctor to turn off the box, as in the future, a human Controller reports to the Daleks that the machine has been activated. The Daleks command that once the spacetime coordinates of the box are confirmed, whoever is using that device must be exterminated.