Sluzhba Bezpeky or SB OUN, (Ukr. Служба безпеки ОУН (б), СБ ОУН) was the Ukrainian partisan underground intelligence service, and a division of the Organization of Ukrainian Nationalists responsible for clandestine operations and anti-espionage during World War II. In its short history, the SB committed acts of terror against civilians and non-civilians and their families including people suspected either of collaborating, or serving with the Soviet forces in western Ukraine. In this capacity, the SB also played a significant role in the ethnic cleansing and killing of the Polish population in Volhynia and Galicia.
The Ukrainian resistance security police (SB) was established in 1940 by S. Bandera and Stepan Lenkavsky, and performed the role of a secret service and counter intelligence agency within Bandera's faction of the Organisation of Ukrainian Nationalists (OUN). The first security police commander was Mykola Lebed.
According to the plans adopted in November 1942 at the "Military conference of OUN(B)", an intelligence and counter-intelligence service (SB) and military gendarmerie were developed. The OUN(B) already had an SB which was set up in 1941 under the command of Mykola Arsenych. On the orders of Dmytro Klyachkivsky, the UPA established "revolutionary tribunals" and military courts, which meted out death sentences for persons over the age of 17. The Military gendarmerie of UPA was established in June 1943. Its activities from 1943 included arrests (and in some cases elimination) of suspected "Soviet agents", as well as the disarming of German Shuma policemen. They were also involved in clashes with Poles and OUN(M) units.
By end of 1943 there were established disciplinary companies and even a disciplinary camp named "Centaur" near the village of Velyka Stydynya in Polissya which were directly under SB command. From 1944 the military gendarmerie acted as an independent authority, although still under SB orders. Most activities in late 1944 were targeted to handle desertion from UPA and mobilization for the UPA. Measures included the death sentence, usually by hanging. From November 1944 to May 1945, 240 persons were executed for "unwillingness to join the UPA". Due the heavy losses, and significant shortage of UPA manpower, the military gendarmerie was liquidated in April 1945.
As regards to the UPA-SB, one of the OUN(M) commanders stated that "it's hard to make the distinction where the UPA ended and OUN begins under Bandera…". In 1941-42 OUN SB activities mainly targeting the "internal threat" – namely that of OUN(B) political opponents (mainly from Melnyk wing of OUN) and those "who act against party line" – for instance one of former OUN(B) military detachment commander which against general directives of Second OUN(B) Conference commenced military action against Germans in late 1942 and as a result was executed on SB order. From its establishment the SB became a responsible authority for intelligence and counter-intelligence actions – however, numerous attempts to infiltrate agents into the Soviet partisan detachments has very limited success. They had more success in infiltrating Polish groups. For instance at one of the SB report for beginning of September 1943 mentioned "during reporting period (1-10 Sept) 17 Polish families liquidated (58 persons) … Area in generally clean. There no pure-breed Poles. Issues of mixed families under resolving"; At same time actions against "internal threat" were not halted – all absorbed non OUN(B) military formation and especially their commanders has own "SB-Angels with hanging wire in hands." Such terror also not excluded SB and UPA itself – only in one military area were liquidated several units of SB and almost 70 insurgents.
Between 1943 and 1945 OUN security police took an active part in the slaughter of Polish people throughout Ukraine. After the war, in the years 1945–1948, Sluzhba Bezpeky conducted executions of Poles accused of collaboration with the communist government or actively opposing the Ukrainian resistance. In practice, however, executions of Poles were not limited to those two groups. OUN security police applied the principle of collective responsibility (i.e. killing entire families). At the same time, ethnic Ukrainians suspected of collaboration with the communists were also executed. The orders to apply solely the principle of personal responsibility were not given until May 1945. However, entire families were massacred beyond that date.
Local OUN security police department employees were entitled to order the execution of a person. They enjoyed practically unlimited prerogatives. As a result, investigations were often brief and resistance members were executed in spite of unsubstantiated charges. The Soviets took advantage of the situation by staging numerous provocations, the result of which was the death of many OUN members wrongly accused of cooperation with the communist security police.
Soviet rule in western Ukraine was initially characterized by brutality and mass terror. NKVD units dressed as UPA fighters and committed atrocities in order to demoralize the civilian population.; among these NKVD units were those composed of former UPA fighters working for the NKVD. Areas of UPA activity were depopulated; the estimates of Ukrainians deported from 1944 to 1952 range from 182,543 in official Soviet archives to 500,000 . Mass arrests of suspected UPA informants or family members were conducted; between February 1944 and May 1946 over 250,000 people were arrested in Western Ukraine. Those arrested typically experienced beatings or other violence. Those suspected of being UPA members underwent extensive torture; some prisoners were burned alive. The many arrested women believed to be affiliating with UPA were subjected to months of torture, deprivation, and rape at the hands of Soviet security in order to "break" them reveal UPA members' identities and locations or to turn them into Soviet double-agents. Mutilated corpses of captured rebels were frequently put on public display.
The SB played a critical role for UPA by responding to Soviet terror with their own terror. After the Soviet Army approach, the main target of SB activities became "Soviet agents and collaborators" as well as their families – as such they were exterminated (in many cases in a sadistic way). An identical fate awaited the families of those who didn't want "to take an arms in hands and join the struggle", as only for one instance 26 November 1944 in village Ispas (Chernivetska region) 15 families (41 persons) were killed due to one person's refusal to join UPA.
Soviet investigative files are filled with references to follow-up investigations of brutal reprisals carried out by SB units against women suspected of "pro-Soviet sympathies". "In village Diadkovichi SB unit murdered Sofia PAVLIUK, who heartily welcomed soldiers of the advancing Red Army." "On the night of 19 September  in the village Bolshaia-Osneshcha, Kolkovskyi raion, the STRESHA band, murdered four women, in whose apartments lived Red Army soldiers." "On the night of 23 September  in village Mykhlin, Senkovych raion, a SB unit of four persons killed four women and injured one. [The women] had gotten together to write letters to their husbands and sons [serving] in the Red Army." While targets of SB violence were certainly not exclusively women and girls, a close look at patterns of rebel violence against local citizens suggests that reprisals against "collaborators" was a euphemism for violence against ethnic Poles during World War II and the first two postwar years, when three quarters of the violence against "locals" was directed against ethnic Poles.
Following the forced deportation of over 800,000 ethnic Poles from Western Ukraine by the Soviets in 1945-1946, as many as four out of five victims of organized violence against suspected "collaborators" were ethnic Ukrainian women, especially young women accused of sexually fraternizing with men of the Soviet occupation. The rebel violence often mirrored or was provoked by the crimes of the Soviet authorities themselves. Typical Soviet counterinsurgency tactics in Ukraine were to arrest women suspected of belonging to UPA and imprisoning them, sometimes for months. These women were frequently beaten, raped, forced to sleep with corpses, and tortured until they were "broken" by their Soviet captors and forced to work against UPA. The large-scale use of such tactics provoked an atmosphere of mistrust and fear, leading to violent reprisals against women and others accused of being spies by UPA. For example, from January 1, 1945 until spring 1945 only in one area of OUN/UPA activity from 938 people suspected of being Soviet spies, 889 were liquidated. Despite this infiltration the SB was able to conduct some counterintelligence actions against Soviet agents and even to infiltrate a few former UPA members which worked in the militia in 1945  whose actions have "compromise the Movement" (even in the eyes of the OUN/UPA).
On 21 June 1948 Soviet investigators uncovered eighteen corpses — seventeen female and one male that were allegedly killed since November 1947 by an OUN/UPA SB unit. The corpses were so badly decomposed that only six could be identified. One corpse had more than a metre of rope around her neck. The SB squad allegedly responsible for the crime had nine members, and acted on the direct instructions of the commander of an UPA regiment based in a nearby forest. All of the executions had been perpetrated under orders. One of the SB unit members had been recruited into the unit by an old friend, Zakharyi Lychko, an officer from the Ukrainian SS Galicia Division, who was arrested in 1946.
- Jeffrey Burds. "Gender and Policing in Soviet West Ukraine, 1944—1948" (PDF). Northeastern University, Boston. pp. 279–281. Archived from the original (PDF) on 2004-04-07.
- Grzegorz Motyka (2006). "Służba Bezpeky OUN-B. Z warsztatów badawczych" [OUN-B Security Police. From research workshops] (PDF). Memory and Justice, No. 9 (in Polish). The Institute of National Remembrance Commission for the Prosecution of Crimes Against the Polish Nation. ISSN 1427-7476.
- Grzegorz Rossoliński-Liebe (2014). "The Ukrainian National Revolution: Mass Violence and Political Disaster". Stepan Bandera: The Life and Afterlife of a Ukrainian Nationalist: Fascism, Genocide, and Cult. Columbia University Press. pp. 184, 263. ISBN 3838206843. Retrieved 2 August 2015.
- Dmytro Vyedyenyeyev. Військово-польова жандармерія - спеціальний орган Української повстанської армії [Field-military Gendarmerie - a special body of the Ukrainian Insurgent Army]. warhistory.ukrlife.org (in Ukrainian). Military History No.5-6, 2002. Retrieved 7 June 2015.
- "Organization of Ukrainian Nationalists and the Ukrainian Insurgent Army, Chapter 5" (PDF). Institute of Ukrainian History, Academy of Sciences of Ukraine: 249–250. Archived from the original (PDF) on 2008-12-19.
- Wilson, A. (2005). Virtual Politics: Faking Democracy in the Post-Soviet World. New Haven: Yale University Press. p. 15.
- Taras Kuzio (28 July 2002). "Ukrainian government prepares bill on recognition of OUN-UPA: RFE/RL Poland, Belarus and Ukraine Report". Ukrainian Weekly. Archived from the original on 2003-09-28.
- Ivan Bilas. Repressive-punishment system in Ukraine. 1917-1953 Vol.2 Kyiv Lybid-Viysko Ukrainy, 1994 ISBN 5-325-00599-5 P 460-464, 470-477
- Складна доля української діаспори [The complex fate of the Ukrainian diaspora]. UKRAINIAN World Coordinating Council (in Ukrainian). April 2005. Archived from the original on 2007-12-10.
- The exact figures of deportees according to Soviet archives - deported (1944-47): families of OUN/UPA members–– 15,040 families (37,145) persons; OUN/UPA underground families – 26,332 (77,791 persons) taken from: Ivan Bilas. Repressive-punishment system in Ukraine. 1917-1953 Vol.2 Kyiv Lybid-Viysko Ukrainy, 1994 ISBN 5-325-00599-5 P.545-546
- Orest Subtelny (2000). "24 Reconstruction and Retrenchment". Ukraine: A History. University of Toronto Press. p. 489. ISBN 978-0-8020-8390-6. Retrieved 4 August 2015.
- Burds, Jeffrey (1997). "Agentura: Soviet Informants' Networks & the Ukrainian Underground in Galicia, 1944-48" (PDF). East European Politics and Societies. p. 97. Archived from the original (PDF) on 2003-10-05.
- "Organization of Ukrainian Nationalists and the Ukrainian Insurgent Army, Chapter 6" (PDF). Institute of Ukrainian History, Academy of Sciences of Ukraine. p. 374. Archived from the original (PDF) on 2008-04-11.
- Ivan Bilas. Repressive-punishment system in Ukraine. 1917-1953 Vol.2 Kyiv Lybid-Viysko Ukrainy, 1994 ISBN 5-325-00599-5