In May 1944, the Department of National Security (Oddelek za zaščito naroda), abbreviated as OZNA, was formed. It was a military intelligence and counter-intelligence organization. In 1946; the military and civilian parts of OZNA were separated; the civilian part changed its name to the State Security Administration, but it was commonly known by its abbreviation UDBA. The agency was a tool of the communist regime to keep it in power and spread terror so people would submit to the communist regime. The UDBA had a broad agenda, and until 1951 was even in charge of criminal investigations and held special prison cells in different locations in Ljubljana and elsewhere in the country.
Besides official employees, there was a network of informants, and their number in the first years after 1945 grew rapidly; in 1950, 24,193 informants were registered in Slovenia. The network of informants in Slovenia was the largest in Ljubljana, and most of the informants were from four main focal social or professional groups: the Roman Catholic Church, the so-called ex-bourgeoisie right, peasants and so-called enemies among their own ranks. Group trials against real and imaginary opponents were held. The UDBA was a feared arm of the communist regime, especially in first 10 to 15 years, until the communists acquired a firm grip over society. In 1966, at the Brioni Plenum, some changes were made; firstly, the autonomy of UDBA branches in the republics increased, and secondly, internal affairs were handled directly by the municipal administrative bodies and the secretariats of internal affairs in each republic or their provincial bodies The regional branch of the UDBA with its seat in Ljubljana and smaller working groups in the field operated in Slovenia. All information and data flowed into the central unit in Ljubljana and was sent on from there to users. Field groups had working contacts with the local authorities, but did not answer to them.