Main Directorate of State Security

The Main Directorate of State Security (, Главное управление государственной безопасности, ГУГБ, GUGB) was the name of the Soviet 
most important security body within the People's Commissariat of Internal Affairs (NKVD) USSR. At the time of its existence, which was from July 10, 1934 to February 3, 1941, the GUGB reflected exactly the Secret Operational Directorate within OGPU under Council of People's Commissars
, which operated within OGPU structure from 1923 to 1931/32.
An intelligence service and secret police from July 1934 to February 1941, it was run under the auspices of the Peoples Commissariat of Internal Affairs (NKVD). Its first head was first deputy of People's Commissar of Internal Affairs (then – Genrikh Yagoda), Commissioner 1st rank of State Security Yakov Agranov.
History.
The Main Directorate of State Security evolved from the Joint State Political Directorate (or. OGPU). On February 3, 1941, the Special Sections (or. OO) of the GUGB-NKVD (responsible for counter-intelligence in the military) became part of the Army and Navy (RKKA and RKKF, respectively). The GUGB was cancelled as organization within 
NKVD USSR. The units that operated in GUGB were reorganized and made the core of newly made People's Commissariat of State Security or NKGB.
Following the outbreak of World War II, the NKVD and NKGB were reunited, but NOT as GUGB but as totally separate directorates. On July 20, 1941 Army and Airforce counter-intelligence was returned to the NKVD as Directorate of Special Departments under Anakumov, in January 1942 Navy CI followed. In April 1943 it was again transferred to the Narkomat of Defence and Narkomat of the Navy, becoming SMERSH (from Smert' Shpionam or "Death to Spies"); at the same time, the GUGB was again separated from the NKVD as NKGB.
GUGB heads.
By the end of 1937 the GUGB was the most powerful and influential organ in the NKVD structure. GUGB departments (or Sections) dealt with - intelligence, internal security, counter-intelligence, protection of government and secret communications.<br> The first chief of the GUGB was Yakov Agranov, Commissioner 1st rank of State Security and first deputy of People's Commissar of Internal Affairs. The next chief of the GUGB from April 15, 1937 to September 8, 1938 was komkor Mikhail Frinovsky, he was succeeded by Lavrenty Beria, then just promoted to Commissioner 1st rank of State Security. When Beria became People's Commissar of Internal Affairs (head of NKVD), Commissioner 3rd rank of State Security Vsevolod Merkulov became his first deputy and the new and final head of GUGB.
Organization.
Between 1934 and 1941, the "Main Directorate of State Security" went through several organizational changes. In January 1935, there were nine departments in the GUGB structure:
By the end of 1937 the People's Commissar of Internal Affairs Nikolai Yezhov, in his order "#00362" had changed the number of departments from five to twelve.
After Lavrenty Beria took over Frinovsky place as a GUGB head, in 29 of September 1938, GUGB underwent another organizational change -
GUGB Ranks.
The GUGB had a unique system of ranks, a blend of the position-rank system used in the Red Army and personal ranks used in the Militsiya; the rank insignia was also very distinct. Even though insignia introduced in 1937 followed the Red Army collar patch patterns, it assigned them to very different ranks for GUGB and Internal Troops/political/specialist branches, with GUGB rank placed at least one grade higher than a similar army equivalent.
When GUGB and Militsiya ranks were replaced with military ranks and insignia in February 1943, Major to Sergeant ranks were aligned with Colonel to Junior Lieutenant, and Senior Major and up were replaced with various degrees of Commissioner. In 1945, General Commissioner Lavrentiy Beria received the rank of the Marshal of the Soviet Union, and other GUGB Commissioners received ranks from Generals of the Army to Major General.