The occupation of Western Ukraine by the Soviet Army became possible due to the so-called Molotov-Ribbentrop pact: a German-Soviet treaty of non-aggression signed on 23 August 1939. The treaty had a secret protocol dividing Europe into German and Soviet spheres of influence. As the territories of Western Ukraine fell into the Soviet sphere they were to be annexed by the Union. Accordingly, shortly after Hitler attacked Poland, the Soviet Army crossed the eastern border of Ukraine and occupied Western Ukraine on 17 September 1939.
At first, the new Soviet administration put forth a number of reforms in education (opening new schools, proclaiming Ukrainian the main language in Lviv University) and medicine as well as the nationalisation of enterprises and expropriation of land from the Polish landlords with the promises to distribute it among Ukrainian peasants. However, this initially progressive attitude was short-lived. 1940 saw new widespread repressions in Western Ukraine. Thousands of people were declared “enemies of the nation”, arrested and deported to Siberia or Kazakhstan. Anyone who could be associated with Ukrainian nationalism was at risk of being deported. The Soviet regime did not tolerate any other political forces apart from the Communist Party. It was only the formerly illegal Organisation of Ukrainian Nationalists (OUN) that remained active without the Soviets’ permission.
Organisation of Ukrainian Nationalists (OUN) had illegally existed since 1929. It was originally created with the aim to fight for Ukrainian independence under the Polish rule. As the Soviets occupied Ukraine they started their struggle against the new oppressor. To achieve the independence of Ukraine, OUN was planning to use Germany's help and so they started negotiations about the creation of Ukrainian military units within the German army. Their demand, however, was not to give an oath neither to Hitler nor to Germany but to Ukraine and OUN, and to fight in the East against the Soviet Union only. As a result of such collaboration, two special Ukrainian battalions - “Nachtigal” and “Roland” - were formed in the German army prior to its attack on the USSR.
The second period of the war started when Germany attacked the USSR on 22 June 1944. Stalin was not prepared for the attack. This was one of the factors explaining the rapid withdrawal of the Soviet army in the first few months. In four months after the beginning of the German offense, most of Ukrainian territory had been occupied by Germans.
The rapid retreat of the Red Army had tragic consequences for those who were imprisoned in Western Ukraine for the disagreement with the new Soviet administration. As there was no time to organise their evacuation, NKVD started a mass execution of the prisoners disregarding their original charges. Thousands of people were killed, which provoked more hatred towards the Soviets among the population of Western Ukraine.
Soviet soldiers preparing rafts to cross the Dnieper (the sign reads "To Kiev!") in the 1943 Battle of the Dnieper
Ukrainian nationalists from OUN welcomed the Nazis at first. From their point of view, OUN and Germany had a common enemy, the USSR. As such, they expected to use Germany in their struggle against the Soviets keeping Ukrainian independence as their final aim. On 30 June 1941, only a week after Germany’s attack on the USSR, OUN announced the creation of the independent Ukrainian State in Lviv. They expected that the Germans would accept this. However, the reaction of the Nazis was far from what was expected. One of the leaders of OUN, Stepan Bandera and his inner circle were arrested and imprisoned. This was the end of the OUN-German collaboration. From there on, Ukrainian nationalists decided to fight against both the Nazis and the Soviets. After World War II and Germany’s defeat Soviet Union remained OUN's only enemy. The Organization remained active until the end of the 1950s.
As the Nazis occupied Ukraine they divided its territory into administrative areas: Reichskommissariat Ukraine with the capital in Rivne, the General-Government of Poland (former Western Ukraine, the territory of Galicia), Bukovyna and South-Eastern Ukraine including Odessa were given to Germany’s ally Romania and formed the administrative unit of Transnistria.
During World War II Ukrainian political activists had to decide whether the Nazis or the Soviets were the bigger threat. The role of a special SS-Volunteer Division “Galician” remains one of the most controversial issues. In 1943 the Nazis announced a formation of a special army unit which would consist of non-German population. The Ukrainian nationalists insisted that the division would fight exclusively against the Soviets. As a result, when recruitment was announced, 82 thousand people applied and 13 thousand of them joined as soldiers. In most cases the volunteers were inspired by patriotism and believed they were helping to further Ukrainian independence. The evaluation of this division caused discussions among historians. Thus, while some insist on defining it as a reflection of collaborationism, the others note the final aim of independence to justify this step.
Taras Hunchak highlights four political forces that existed in Ukraine during the war: German occupiers, Soviet partisans, and Polish and Ukrainian independent partisan movements.
Ukrainian Insurgent Army (UPA), created by the nationalist organisations, fought against both Germany and the USSR for the independence of Ukraine. At the same time, it was involved in a conflict with the Polish Armia Krajowa over the lands of Western Ukraine, which the Polish saw as their ethnic territory. The violence between Ukrainians and Poles was exacerbated by both German and Soviet propaganda. In 1943-1944 the Ukrainians murdered 60-80 000 Poles who lived in that area.
In 1942, the Ukrainian headquarters of the partisan movement was founded. Struggle against enemies attracted more and more supporters to fight for the cause. In 1942 partisans in Ukraine accounted for 26 000 people. By 1943 the number had grown to 58 500.
In 1944 with the counter-attack of the Soviet army, the territory of Ukraine was cleared of German troops. Returning to Ukraine, Soviet authorities tried to promote Stalin’s regime from a new angle. To show support for the partial sovereignty of the Ukrainian SSR two new ministries were formed: the Ministry of Foreign Affairs and the Ministry of Defence. However, the Soviet return to Western Ukraine had other consequences. The population there widely supported the ideas of Ukrainian nationalism. Consequently, more than 3,500 propagandists were sent to the region to promote Sovietisation. Widely supported Greek-Catholic Church was outlawed. A special operation to eliminate the UPA was planned. One of the aims of the propagandist campaign was to depict UPA as violent murderers associated with the Nazis.
The widespread Soviet propaganda against UPA had consequences for the future generations of Ukrainians. Even nowadays the attitudes towards OUN, UPA and their leaders vary from very negative to extremely positive. Thus, as David R. Marples notices the leader of OUN, Stepan Bandera, “has been depicted as a hero and as a villain, as a liberator or potential liberator of an oppressed nation and as a terrorist and a Nazi collaborator. In the Soviet era, his name was tied to evil, terrorism and treachery by the Soviet authorities and propagandists. In various towns and villages of Western Ukraine, on the other hand, statues have been erected and streets named after him.”
Former UPA and UNA members with Plast Scout Organization pose for photos shortly after the Anniversary of the UPA ceremony in Berezhany, Ukraine
The estimates of the exact number of war casualties in Ukraine differ between authors. After detailed research of various sources and their comparison Wolodymyr Kosyk has come to the conclusion that there were more than 5.5 civilian victims and 2.5 million people who died at the front, which in total accounts for 8 million or 19 per cent of the whole population. The Ukrainian casualties make up 40-44 per cent of the whole loss of lives in the USSR during the war”.
 Гунчак, Україна, 222.
 Субтельний, Україна, 556.
 В. Косик, Україна і Німеччина у другій світовій війні (Париж-Нью-Йорк-Львів: НТШ, 1993), 75.
 Субтельний, Україна, 563.
 Косик, Україна і Німеччина, 147.
 Субтельний, Україна, 556-557.
 Ibid. 568-569.
 Ibid. 573.
 Ibid. 578.
 Ibid. 579.
 Гунчак, Україна, 227.
 Субтельний, Україна, 583.
 Гунчак, Україна, 231.
 Субтельний, Україна, 589.
 D.R. Marples, ‘S. Bandera: The Resurrection of a Ukrainian National Hero’ in Europe-Asia Studies Vol. 58, No. 4 ( 2006), 555.
 Косик, Україна і Німеччина, 455.