The KGB, or Komitet Gosudarstvennoy Bezopasnosti, occupies a significant place in the annals of Soviet history, evolving from a series of predecessors that trace back to the tumultuous period of the Russian Revolution. The roots of Soviet intelligence services can be traced to the early 20th century, with the formation of the Cheka in 1917. The Cheka, an acronym for All-Russian Extraordinary Commission for Combating Counter-Revolution and Sabotage, served as the nascent Soviet government's first security organization. Its mission encompassed counterintelligence, quashing political opposition, and safeguarding the Bolshevik regime during a time of revolutionary fervor.

As the political landscape shifted, so did the security apparatus. The GPU, or State Political Directorate, succeeded the Cheka in 1922. Under the leadership of Felix Dzerzhinsky, it continued the work of its predecessor, consolidating power for the Communist Party. However, it wasn't until 1934 that the organization underwent a significant transformation with the establishment of the NKVD, or People's Commissariat for Internal Affairs. Led by figures like Lavrentiy Beria, the NKVD expanded its scope to include not only security and intelligence functions but also internal policing, mass repression, and the administration of the infamous Gulag labor camps.

More Info: en.m.wikipedia.org