A vast network of Nazi sympathisers apparently working to undermine Britain's war effort against Germany was secretly controlled by MI5, according to newly-released documents.

Files released by the National Archives show that the motley array of traitors and "fifth columnists" active in Britain during the Second World War was totally penetrated by the Security Service.

MI5 even drew up plans to issue them with special badges to be worn in the event of an invasion - supposedly to identify them as friends to the Germans, but in fact to enable them to be rounded up by the police.

At the centre of the operation was a MI5 agent, known by the alias "Jack King". By the end of the war, MI5 estimated he was able to control the activities of hundreds of would-be traitors.

In 1942, King met a "crafty and dangerous woman" called Marita Perigoe.

Said to be of mixed Swedish and German origin, she was married to a member of Oswald Mosley's British Union of Fascists (BUF) who had been interned in Brixton Prison. She, however, had no time for the BUF, regarding them as "insufficiently extreme".

In order to penetrate her network of fifth columnists, King managed to convince her he was a representative of the Gestapo looking for people "a hundred per cent loyal to the Fatherland" who could be relied on to help in the event of an invasion.

By the end of the war, Perigoe was one of six agents working directly to King.