OZNA was founded on May 13, 1944 under the leadership of Aleksandar Ranković (nom de guerre Marko), a top member of the Politburo until his downfall in 1965/66, and a close associate of Josip Broz Tito.
Until OZNA was established, intelligence and security tasks were carried out by several organizations. In spring, 1944, the tasks were carried out by the Section for Protection of Nations in central and western Bosnia, part of Croatia, and Vojvodina; centers of territorial intelligence in Croatia, Vojvodina and Montenegro; intelligence division of the Internal Affairs Section within the SNOS Presidency in Slovenia; and intelligence service of partisan detachments in Serbia, Macedonia, and Kosovo.
The reorganization of intelligence and security could not satisfy the growing needs of the Supreme Staff. OZNA was created as autonomous, military organization whose unitary structure and centralized leadership were to ensure a tough political line in the intelligence and counter-intelligence services. All OZNA tasks were divided into four groups, each comprising an organizational unit:
The first section (intelligence) organized intelligence activity in other countries, enemy state institutions, and occupied territory. It recruited agents and sent them to work outside the borders of the liberated territory. It collected intelligence on enemy agent networks, police, quisling state machinery, and quisling military units. This was essentially an offensive intelligence service, directed against foreign countries and occupied territory.
The second section (counterintelligence service in the liberated territory) collected information from trusted informers on political groups which had either joined the national liberation movement or stayed outside it, on enemy agent activities, and on armed groups of national traitors and fifth columnists.
The third section organized counter-intelligence protection of armed forces and was active only in the NOVJ & PO (People's Liberation Army of Yugoslavia and Partisan Detachments).
The fourth section performed statistical and technical tasks, processed information, and kept records. This section also included special photography, secret writing, radio centers, and decoders.
A fifth and sixth section were formed in OZNA in March and April 1945.
The fifth section was formed as a counterintelligence service against foreign agent networks in Yugoslavia; that is, foreign intelligence services. (In 1946, this section merged with the new third section, which was created after the military counterintelligence service became independent).
The sixth section performed tasks dealing with counter-intelligence protection of transportation, but was absorbed soon after its establishment by the second sector.
When the National Liberation Army changed its name into the Yugoslav Army on March 1, 1945, the OZNA of Democratic Federal Yugoslavia proclaimed by special directive (March 24,1945) a new organization of the Yugoslav Army - OZNA. OZNA was in direct command of counter-intelligence protection of military command posts, institutions, and units. Sections were set up within independent corps. This third OZNA section was in force until the end of July, 1945, when the "military" and "civil" part of OZNA began to separate and finally split in March, 1946. At that time, the Administrative Directorate for Security of Yugoslav Army - (KOS or Kontra-Obaveštajna Služba) was formed from the military part and the Administrative State Security Directorate - (UDBA) from its civilian counterpart.
Since OZNA was actually left without its third section after the military counter-intelligence service became independent, it formed a new third section unconnected to the previous one. It focused initially on reconstruction and operations of the German intelligence service (especially Gestapo). Later, the third section assumed operations for all foreign intelligence services, borders, and traffic of foreigners (which were essentially the tasks of the fifth section).
The fourth section continued filing information they had been collected within the OF VOS since 1941. From initial information files on 4,000 people, by the end of the war the number had increased to 17,750.
OZNA was led by a chief who was directly subordinate to the Supreme Commander of SFRJ, Marshall Josip Broz Tito.