A terrorist plot to assassinate Mikhail Gorbachev in East Germany in 1989 has been revealed in print by the SAS soldier who claims to have thwarted it.

Tom Shore – a pseudonym – was sent into East Germany by British security services in 1989 on a mission to uncover details of what was believed to be a Soviet military operation. He found no such evidence, but while undercover he made contact with a movement working for reform and democracy in Leipzig.

Shore gives a dramatic account of his time behind the iron curtain in his memoir Pilgrim Spy, published on Friday. In its pages he reports that the fledgling uprising that would later topple the Berlin Wall and herald glasnost across eastern Europe had been infiltrated by members of the Red Army Faction. Sometimes described as the Baader–Meinhof gang, the collective was, he reports, plotting to assassinate Russian president Gorbachev during his visit to East Germany on 7 October 1989. The murder, Shore believes, would have been “the trigger for the Soviets to retake … East Germany”:

“Then there were the home-grown terrorists, like the German Baader-Meinhof Group – otherwise known as the ‘Red Army Faction [or] RAF’… The group is often talked about in terms of generations. The ‘first generation’ consisted of Baader, Ensslin, Meinhof and others. The ‘second generation’ came about after the majority of the first generation was arrested in 1972. The ‘third generation’ RAF existed in the 1980s, 1990s and up to 1998.”

Shore says he allowed the freedom movement use of the special forces radio he could access, in order to help spread the word about the peaceful “Monday demonstrations” that were taking place in Leipzig, and which the people hoped would lead to a bloodless East German revolution.

“A few weeks later I was servicing the radio in an isolated location and was confronted by two armed men. I managed to turn the tables on the pair but during questioning they told me they were members of the Red Army Faction … They’d infiltrated the freedom movement, knew about the radio, and wanted it, they were searching for it,” said Shore.

“Then the real shocker came. As I continued to question them, they just blurted it out; when men are threatened they will tell you what they need to tell you in order to stay safe. So it came out that the Red Army Faction was plotting to assassinate the Russian president during his visit to Berlin for the [German Democratic Republic’s] 40th anniversary celebrations. I knew if Gorbachev was murdered on East German soil the Russians would immediately blame the freedom movement and as a result would have the excuse they needed to roll out the tanks and take back full control of what, at the time, was a Warsaw Pact country on the verge of revolution.”

Bravery in Leipzig … about 70,000 people protest against the East German communist regime in October 1989. Photograph: Uwe Pullwitt/Reuters

Shore, who was operating alone, decided the plot had to be stopped at any cost, and took actions in to thwart it. He was told at the time that the assassination plot originated from among senior Politburo and KGB staff.

Shore writes that he has never told this story before, even to his wife. If the plot to kill Gorbachev had succeeded, he writes, “Europe’s history in the second half of the 20th century and beyond would have been very different.

“I had probably saved Mikhail Gorbachev’s life, and in the process possibly removed Russia’s old guard’s excuse to take full control of East Germany once again. No one would ever know and, at the time, I wanted it to stay that way,” he writes.

Photograph: Hodder & Stoughton

Shore told the Guardian that he had decided to speak now because “most of the people involved are dead or long retired, no operational secrets are being revealed, and no lives are being put at risk. I felt it was an important episode for Europe and one that needed to be public, and without me to tell the story then it’s going to be lost to history.” He also feels that the peaceful efforts for change in Leipzig at the time have been unfairly forgotten.

“I think it’s a story that needs to be told, not only for what went on but for what people don’t know. The Berlin Wall came down at a hell of a rate, but what’s overlooked is the efforts of the people in Leipzig who risked their lives for weeks to bring about the changes in government. A lot of them were brutally treated, arrested, subjected to some real horrors, but we overlook this because the Wall came down and that was it.”

Another twist in Shore’s story is his time with Vladimir Putin, then head of the KGB in Saxony, who was involved in the Soviet drive to halt reform.

“At the time he was a major. Admittedly he was the head of the KGB in Saxony but he was an unknown,” said Shore. “His presence at the rallies and other locations just confirmed the Russians and East German authorities were doing their best to stamp out the freedom movement. There was no hint that one day he might become the most powerful and dangerous man on the planet. My personal paranoia grew, which it does when you’re working alone and undercover – he quickly became an itch I couldn’t scratch. He was just always there.”

According to Shore, two of the men involved in the plot to assassinate Gorbachev are still active and on Germany’s most wanted list.

The former soldier says that he is “proud to have played a small part in the liberation of a nation”, but adds that “the events leading up to and immediately after the fall of the Berlin Wall changed me for the worse and for ever”.

“The things I saw, the decisions I made, the actions I was forced to take at the time, turned me into a person that I struggle to live with, even today. For many years, these events totally destroyed my faith in human nature, reducing any notions of friendship to nothing more than a hollow gesture,” he writes.

• Pilgrim Spy is published by Hodder & Stoughton.