By the 10 July 1934 decision of the USSR Central Executive Committee, the United State Political Department (USPD) was abolished as an independent body. On its basis, the Main State Security Department (SSSD) was established and incorporated into the USSR People's Commissariat of Internal Affairs (PCIA). The reorganization of state security agencies stemmed from significant changes in operational conditions and external threats.
As the threat of Nazi Germany's invasion of the USSR increased in 1935-1938, the special services of the USSR and the Azerbaijan SSR faced urgent tasks. Baku oil was of special interest to Hitler in terms of weakening the Azerbaijan SSR in general, as well as in terms of his expansionist policy in the East. The Nazis promised Germany's Continental Oil Company the right to extract, refine and transport Baku oil. As a result of practical measures taken, several specially trained spies of Nazi Germany were captured in Azerbaijan.
The current situation dictated the restructuring of the security services. By the 20 July 1941 decree of the Board of the Supreme Soviet of the USSR, in connection with transition to wartime conditions, the PCIA and the PCSS were merged and renamed the PCIA. According to the decree, relevant changes were made in the structures of the security agencies of the allied and autonomous republics, territories and regions. By the 20 August 1941 decree of the Board of the Supreme Soviet of the Azerbaijan SSR, the PCIA of the Azerbaijan SSR and the PCSS of the Azerbaijan SSR became a single body and were called the PCIA. Mirteymur Miralakbar oglu Yagubov was appointed head of the organization, and Stepan Fyodorovich Yemelyanov was appointed his first deputy.
Due to the situation, the structure and responsibilities of the security agencies changed frequently. As a result, by the decree of the Board of the Supreme Soviet of the Azerbaijan SSR, the People's Commissariat of Internal Affairs was renamed the People's Commissariat of State Security from 26 May 1943.