Within the world of James Bond, SMERSH is a Soviet counterintelligence agency that is a recurring threat to him and the British Secret Service. In "Casino Royale", the first Bond novel, SMERSH is described as the most powerful and feared organisation in the Soviet Union, with its main headquarters in Leningrad. It was believed to be under the personal direction of Lavrentiy Beria and was tasked with "the elimination of all forms of treachery and back-sliding within the various branches of the Soviet Secret Service and Secret Police at home and abroad" (a mission vaguely similar to that of the real-life SMERSH). The organisation was suspected of having carried out Leon Trotsky's assassination in 1940. While it was hugely expanded during World War II to deal with treachery among Soviet forces, it was purged after the war and by the time of "Casino Royale" was believed "to consist of only a few hundred operatives of very high quality", only one of whom had ever been captured by British agents. By the time of "From Russia, with Love", however, Fleming describes SMERSH as having 40,000 agents and being based in Moscow rather than in Leningrad.