Image copyright Alamy

While generations of Westerners were growing up on the films of James Bond, Soviet citizens had their own favourite spy, a wartime agent who went under the name of Max Otto von Stierlitz. And it could easily have been Stierlitz who prompted Vladimir Putin to join the KGB, writes Dina Newman.

The USSR's answer to James Bond was a very different kind of spy. He had no time for women or gadgets. His life was devoted entirely to his work in Berlin in World War Two, where, under cover, he infiltrated the German high command.

Stierlitz was the hero of a 12-part series, Seventeen Moments of Spring, screened on Soviet TV every year around 9 May - the date the USSR marked as the end of World War Two.

The first broadcast, in 1973, was watched by an estimated 50 to 80 million people.

"Every evening the streets were deserted and people rushed home from work to watch the latest episode and to find out what would happen next," says Eleonora Shashkova, one of the stars of the series.

In 1999 the Kommersant newspaper commissioned a poll asking which film character Russians would like as their next president - Stierlitz came second

Apart from being a gripping drama, it has a perfect Cold War plotline, with Stierlitz disrupting secret peace negotiations between the Nazis and the Americans in 1945. But the film also had another hidden purpose.

"The film showed the importance of secret agents, who are highly respected people in our country. It instilled patriotism in the post-war generation," says Shashkova.

In fact, it was commissioned by Yuri Andropov - then head of the KGB, later the country's leader - as part of a PR campaign designed to attract young, educated recruits.

Andropov personally approved the series before it went on air, shooting was overseen by his first deputy, and two KGB operatives employed as consultants appeared in the credits under aliases.

Vladimir Putin has never said whether or not it was Stierlitz who inspired him to become a spy. But he was 21 when the film was first screened, and he joined the KGB two years later.

In time, like Stierlitz himself, he was posted to Germany.

If Bond was a pathologically heavy drinker, Stierlitz - like Putin - was quite the opposite.

In the film he spends most of his time alone, smoking, drinking coffee and looking pensively out of windows.

Find out more

Listen to Dina Newman talking to Eleonora Shashkova for Witness, on the BBC World Service

Download the Witness podcast

In fact, Kim Philby, the British spy who defected to the USSR in 1963, commented that a spy who looked so thoughtful would not last long in his job.

In 1991, when Putin had already left the KGB and was working for the mayor of St Petersburg, he admitted for the first time to his career as a spy in a TV documentary, which includes a re-enacted scene from Seventeen Moments of Spring. Instead of Stierlitz driving his car back to Berlin, Putin is seen at the wheel of a Russian Volga car, with the film's theme tune playing in the background.

Image copyright Getty Images

In the documentary, the future Russian president warns there is a risk that "for a period of time, our country will turn to totalitarianism".

He goes on: "But the danger lies not in the law enforcement organs, nor in the state security services nor in the police - and not even in the army. The danger lies in our own mentality. We all think - and even I think it sometimes - that if we bring order with an iron fist, life will be easier, more comfortable and safer. But in reality, we won't be comfortable for long: the iron fist will soon strangle us all."

Some years later, in the chaos of the late 1990s, many Russians did indeed begin to yearn for law and order, and some for the iron fist.

Opinion polls indicated that voters were keen for the next president to be young, ethnically Russian, a former member of the security services and a non-drinker.

Image copyright Alamy Image caption The actor Vyacheslav Tikhonov as Stierlitz, in Seventeen Moments of Spring

"Having lost faith in liberals, the country was searching for its Stierlitz," writes Arkady Ostrovsky, Russia and Eastern Europe editor for the Economist, in his book, The Invention of Russia.

In 1999, he notes, the Kommersant newspaper commissioned a poll asking which film character Russians would like as their next president. Stierlitz came second, after the wartime military commander Marshal Zhukov. The cover of the newspaper's weekly supplement carried a picture of Stierlitz with the caption, "President-2000".

And in March 2000, after a period as acting president, Putin was duly elected to the post.

More from the Magazine

Image copyright AFP Image caption Vladimir Putin revisits an old haunt in Dresden, in 2006

Anyone who wants to understand Vladimir Putin today needs to know the story of what happened to him on a dramatic night in East Germany a quarter of a century ago, writes Chris Bowlby (March 2015).

Vladimir Putin's formative German years

Eleonora Shashkova plays Stierlitz's wife in Seventeen Moments of Spring, but interestingly, the two characters never meet - except in one famous scene, where she is taken from Russia to Berlin, and visits a cafe with another man.

Stierlitz is already sitting at another table in the cafe, and from time to time they manage to exchange furtive glances, full of longing.

The viewer sees his eyes, then hers, then his eyes again. Ater a few minutes she gets up and slowly walks out.

On her 70th birthday, in December 2007 - more than seven years into the Putin era - Shashkova received a special present, unprecedented in the history of Soviet cinema. It was a thank you gift from the Russian secret service, for her portrayal of the wife of a foreign agent.

Join the conversation - find us on Facebook, Instagram, Snapchat and Twitter.