'The Second Doctor and Jamie are enjoying the Atkyan Peace Festival known as Yelyahj. This festival celebrates the Atkyans survival from a plague that killed many of their race one thousand years earlier. Jamie in particular seems very attracted to a young woman called Soji whose parents are providing somewhere for the time travellers to stay. The next morning, however, they wake up in a harsh and militaristic world where their hosts view them with hostility. The Doctor is enrolled as a scientist in a weapons facility and Jamie is conscripted into the army. The Doctor suspects that time is in flux and that somehow only he and Jamie have any memory of the alternative time stream. One thousand years earlier the Fifth Doctor and Turlough manufacture the cure for the plague, but it has a side effect - transforming the peaceful Atkyans into an aggressive and warlike people. The Doctor then manages to come up with a stabilising agent that removes this dreadful side-effect and departs the planet, congratulating himself on his work. The Second Doctor and Jamie now find themselves alone in a giant museum. It tells them that the entire race was wiped out by the Doctor's cure which halved their life expectancy for each generation. The Doctor realises that this must be a reference to a future incarnation of his. Jamie wonders why this future version of the Doctor has not got any memory of the fate of the people he was trying to save. The Doctor replies that once the time stream has settled the memories - and a giant headache - will come flooding back. The memories return to the Fifth Doctor and he tells Turlough what they have done. Turlough asks if they can go back in time to undo their mistakes but the Doctor tells him that time has crystallized already. As a consolation Turlough reminds the Doctor that the Atkyans would have died anyway, or (in the alternative version) become a deeply unpleasant race.'
Source: drwhoguide.com (http://www.drwhoguide.com/whotrip26.htm)