I once met a former dissident who spent eight miserable years in a Soviet labour camp. While there, he contracted tuberculosis and ended up in an isolation centre, a prison within a prison – a place of danger and squalor even by the standards of the Soviet camps.

Kirill was a Muscovite, intellectual and Jewish, all characteristics likely to attract special treatment from the prison guards and their stooges, who he still called by the prison term “bitches”. His life was saved, however, from the unlikeliest of directions. A vor-v-zakone – a “thief-in-law” Soviet mafia boss – offered him protection in exchange for conversation and games of chess.

It is no exaggeration to say that the thief’s protection saved Kirill’s life and that he was intrigued by his saviour’s motivation. They could barely have been more different, but they did share a principle: they refused to cooperate with the Soviet government. Dissidents boycotted the government out of liberal idealism, the thieves from ancient tradition. They considered themselves to be honest – it was the world that was bent. They earned what they had with fists and cunning: they had no time for the crooks in uniforms who used laws to get their way.

In Soviet times thieves were used to move things around… Now the Kremlin relies on them to fill more significant roles

Kirill’s tale was my introduction to Russia’s underworld, which Mark Galeotti brilliantly describes in The Vory, his history of Russian criminals from the 18th century to the present day. Thieves are mythologised in Russia, much in the way the mafia are in American cinema, and their music and slang are widespread. Galeotti cuts through the legends, to get to the real story.

The thieves emerged in tsarist times, but it was the Soviet camps that forged their subculture – Galeotti wittily refers to it as a “gangster archipelago” – as mafiosi from around the country got to know each other, exchanging methods and contacts. During the Stalin-era heyday of the Gulag, they were untouchable, too powerful for the prison guards to deal with. Galeotti’s account of what happens next rather undermines Kirill’s idea of the thieves as proto-dissidents, however.

After Stalin’s death, most camp inmates were released, giving the authorities more time to focus on the gang leaders. The collaborators – the “bitches” – were empowered to persecute them, which they did with extreme prejudice, until the code of non-cooperation was broken. Kirill’s friend must have been a rare outlier, because few thieves still lived by the code by the late 1970s. By the end of the Soviet Union, the criminal world and the security services – the chekists – were interpenetrated.

Once the thieves had discarded their code of honour, and the chekists had stopped pretending to be honest, this became a mutually profitable connection, with important consequences for what Russia would become. The thieves’ smuggling made up for the failures of the Soviet economy and their networks allowed KGB men to make money. After the collapse of 1991, only two groups had the confidence and contacts to seize the opportunity: the thieves and the chekists, and increasingly there was no distinction between them.

Q&A Does Russia present a credible threat to the UK? Show Russia has been a useful bogeyman since its annexation of Crimea in 2014. UK military chiefs were spooked when Russia, during an intervention in Ukraine, used a combination of drones and artillery to destroy Ukrainian armour, and raised questions about whether the UK would be able to do much better than the Ukrainians in similar circumstances. The UK is far enough away for Russia not to pose a territorial threat. But UK forces are deployed in the Baltic states along with US and other Nato forces as a deterrent in the unlikely event of a Russian landgrab.

Russia does present a threat through hybrid warfare, or the use of deniable acts of disruption – primarily cyber-attacks on the UK that could disrupt essential services or interference in the democratic process, such as in elections.

“Sometime around the turn of the 21st century, state-building thieves and criminalised statesmen met in the middle,” Galeotti writes. “Under Putin, the real currency is not the rouble, but political power, and mere money and property are at best something held in trust.”

In Soviet times, the authorities used thieves to move things around, to supply booze for parties and to find “deficit” goods for cities that the plan had neglected. Now the Kremlin relies on thieves to fill more significant roles. The hackers who targeted the US election are thieves in a new guise: patriotically undermining foreign political systems one day, stealing credit card numbers the next. The men who undermined Ukrainian rule in Crimea quickly went back to the rackets that were their day job once Russia’s control was secured.

Galeotti’s book adds vital texture to the description of Russia as a kleptocracy. He sees it as a country where there is no meaningful distinction between crime, politics and law enforcement. All three are versions of each other, with individuals playing different roles depending on the requirements of the moment. The Vory is a timely, readable and important text for anyone thinking of ways to restrict Russian influence over the west and to punish Russia’s leadership for its crimes.

In his final chapter, Galeotti quotes a Russian friend as asking him: “Why do you in Britain hate our mafia in Russia but love them at home?” In a month when British ministers have been lining up to denounce the influence of oligarchs that their party has accepted hundreds of thousands of pounds from, it is an important question. There is no honour among Russia’s thieves and it is past time that we woke up to that fact.

• The Vory: Russia’s Super Mafia by Mark Galeotti is published by Yale University Press (£20). To order a copy for £17 go to guardianbookshop.com or call 0330 333 6846. Free UK p&p over £10, online orders only. Phone orders min p&p of £1.99