By Dominic Casciani
BBC News at the National Archives
One of the UK's best known children's authors was watched by MI5 in the 1920s and 30s because it feared he was a traitor working for Moscow.
Arthur Ransome: Reported on Russian Revolution
Arthur Ransome, author of Swallows and Amazons in 1930, married Trotsky's secretary and travelled widely in the Soviet Union for British newspapers.
He kept London informed of what he learnt and intelligence chiefs passed details to the King.
But it took MI5 20 years to finally concede Ransome was loyal to Britain.
For most people, Leeds-born Ransome will be remembered for his story of idyllic childhood holidays in the Lake District, where the most exciting thing that happens is boating on slightly choppy waters.
But years before its publication, Ransome, whose name first appeared in MI5 files in 1918, was an active socialist and foreign correspondent who reported on the Russian Revolution.
Idealism and love
His links to the Bolshevik leadership were cemented when he fell in love with Trotsky's secretary, Evgenia Shelepin, whom he would later marry as his second wife. In 1919 he even arrived in Estonia carrying a personal message for its people from Lenin himself.
He had been occasionally briefing British officials on what was going on, but largely regarded himself as a historian of a great moment in history, the files reveal.
According to documents released at the National Archives, the British secret services began watching Ransome, given codename S.76, after concerns he had turned his back on Britain.
The British consul in Moscow, Robert Bruce Lockhart, had been caught up in a clever Soviet sting operation designed to implicate diplomats in an attempted overthrow of the young regime.
So when Ransome hastily left Moscow, London feared the journalist was "indifferent" to the fate of his fellow British citizens and had failed to use his influence in the corridors of power.
British officials in Stockholm invited Ransome in for a chat - and their initial conclusion was not favourable. Here was an "exceedingly clever and interesting fellow - but an out and out Bolshevist".
Consul to the rescue
Ironically, it was Lockhart himself who eventually spoke out for Ransome, saying he had been a valuable intelligence asset amid the worst chaos of the revolution.
"He is quite loyal and willing to help," says one report, referring to Lockhart's observations.
Children's favourite: Published after return from Russia
"The appearance of working against us is due to his friendship with the Bolshevik leaders, not by any means to any sympathy with the regime, which the Terror has made him detest.
"We expect to get a lot of most valuable stuff from him, and it is hoped that you will see your way, so to speak, to leave him along for a bit and give him a chance."
Ransome's return to the UK was talked about at high levels in MI5 with London chiefs who decided he should at the very least be searched and escorted for interview at Scotland Yard.
The discussions were copied to both the war cabinet and the King.
He was indeed interviewed on his return - detectives found him to be clean - and he later returned to Russia for the Manchester Guardian. He wrote a pamphlet defending the principles of the revolution, but reportedly agreed with officials he would not promote "Bolshevik propaganda".
And as the chaos worsened in Russia and purges took hold among the Bolshevik leaders, Ransome was given official assistance to bring Miss Shelepin to England, again on the recommendation of Lockhart.
Although Ransome was no longer being actively watched, it was not until 1937 - seven years after the publication of Swallows and Amazons - that Ransome's name finally made it off MI5's watch list.