The FSB is much more than just an ordinary security service. Combining the functions of an elite police force with those of a spy agency, and wielding immense power, it has come a long way since the early 1990s, when it was on the brink of imploding.

Today's agency draws a direct line of inheritance from the Cheka, set up by Vladimir Lenin in the months after the Bolshevik revolution, to the NKVD, notorious for the purges of the 1930s in which hundreds of thousands were executed, and then the KGB. As the Soviet Union disbanded, the KGB was dismembered into separate agencies, and humiliated. The security services were forced into a new era of openness and researchers were allowed into the archives for the first time to investigate the crimes of the Stalin period.

Many of the brighter or entrepreneurial KGB operatives left the agency in the chaos of the 1990s, using their contacts and know-how to enter the business world as security consultants, fixers or businessmen in their own right. They included the current owner of the Evening Standard and the Independent, Alexander Lebedev, previously a junior officer working out of the Soviet embassy in London, who used his knowledge of how international financial markets to make his fortune.

As the 1990s wore on the agency got back on its feet and in 1999 Boris Yeltsin asked its then director, Vladimir Putin, who had recently been catapulted into the top job after a career in the service's lower echelons, to become prime minister.

With Putin as PM and then president, much of the FSB's power was restored. Many of his former KGB colleagues ended up in senior positions in government or at the helm of state-controlled companies. Lower down the chain of command, a blind eye was turned to FSB generals enriching themselves: it was no longer necessary to leave to earn a good living. One top officer complained that the secret service "warriors" had become "traders".

Despite its reputation as a slow-moving bureaucracy, the FSB has long taken on geeks who can help it stay ahead of the game technologically. In a time-honoured tradition, the agencytrawling the final-year students of the country's top technology institutes and inviting the best graduates to apply.

The agency has its own special institute known as IKSI, the Institute of Cryptography and Protection of Information, which used to work on code breaking but now focuses on information security. Its page on the FSB website boasts that more than 200 professors work at the IKSI, teaching students everything there is to know about computer systems and security. The only downside for computer whiz-kids is that salaries in the FSB, officially at least, are far lower than they would be at major tech firms.

Unlike the KGB, the FSB is not in charge of foreign spies. The responsibility for running agents likesuch as Anna Chapman and the nine other spies caught by US authorities, has passed to a separate agency, the SVR. But internally, the FSB has an extraordinarily wide remit.

When alleged CIA operative Ryan Fogle was caught with a blond wig and a compass, apparently attempting to recruit Russian counterintelligence officers for the US this year, it was the FSB who picked him up, interrogated him and released a humiliating video.

Its border guards, who have been under FSB control since 2003, stormed Greenpeace ship the Arctic Sunrise in September, descending from helicopters wielding guns and knives. The agency is also strongly involved in combating "economic crimes", and is responsible for most counterintelligence operations. Western diplomats report a huge rise in surveillance and harassment from people they presume to be FSB agents, with foreign journalists and businesses also targeted.

The agency still operates from the Lubyanka, the central Moscow building notorious during the Soviet era for interrogations in its basement cells. There are no official figures on how many people the FSB employs, but the security services expert Andrei Soldatov estimates the number to be at least 200,000.

After the 2006 death of former FSB officer Alexander Litvinenko from polonium poisoning, in which Scotland Yard strongly suspected some level of state involvement, Britain announced a moratorium on all co-operation between the FSB and British security services. This stayed in place until May, when David Cameron paid a call on Putin at his summer home near Sochi. The leaders agreed that with the Sochi Olympics approaching, Britain would resume "limited" co-operation to ensure the security of competitors and spectators.