Britain's Security Service, known as MI5, worked with the boy scout movement to help it avoid infiltration by both communists and fascists between the world wars, previously secret papers show.
The files were published online for the first time yesterday by the National Archives in London as part of its commemorations of the first world war, which began 100 years ago.
They also include a transcript of an interrogation of the Dutch-born German spy, Mata Hari, and reports on Arthur Ransome, author of the Swallows and Amazons children's books, who British agents considered "an ardent Bolshevist".
The documents show how seriously scouting, established in 1907 by Robert Baden-Powell, was taken by intelligence agencies. By 1922 the scout movement claimed a worldwide membership of more than one million.
"What do we know about the 'Red' boy scout movement in this country?" a typed memo from 1920 asked. "We have no record of any such movement here," came the reply.
A year earlier, MI5 had cleared a visit to Britain by a group of German scouts. By 1922 it was looking into rumours that German boys whose fathers had been killed in the first world war were "being formed into an association with a programme which the Germans feel is bound to bring 'big results'".
In 1924, the Scouts Association sought MI5 advice about whether to accept an invitation to a peace conference. The Foreign Office also suggested the Security Service send an officer to the world jamboree in Copenhagen that year. "We could quite well account for your presence by making you appear in some secretarial capacity," a diplomat's note said.
MI5 checked out suspicious names on the guest list. One, a Milos Seifert, was described as "a Czecho-Slovak who appears to be aiming at the creation of a Communist Boy Scout movement throughout Europe".
In 1926, the scouts in the United Kingdom were said to be aware of communist infiltration attempts. By 1934, the concern had shifted back to Germany and links with the Hitler Youth.
The papers also tell how Margreet Zelle MacLeod, an exotic dancer better known by her stage name of Mata Hari, was stopped by border authorities in the UK in 1916, in the middle of the war.
She was interrogated and allowed to leave the country, after French Intelligence sent a reply about her: "Madame MacLeod is considered extremely suspect by Captain Ladoux, but he has not been able, so far, to obtain definite evidence against her. Therefore in order to obtain, if possible, evidence, he has pretended to make use of her."
The following year she was arrested by the French, court-martialed, and shot. A report back to MI5 from Paris betrayed a hint of admiration. "She never made a full confession nor can I find, either from the dossier, or from my conversations with Lafenestre, that she ever gave anyone as her 'complice'," it said. "She was a 'femme forte' and she worked alone."