World War II (1939-1945), the war began on September 1, 1939, with Germany's attack on Poland. Within three weeks West Belarus, which had been under Polish rule since the 1921 Treaty of Riga, found itself annexed to the Soviet Union as a result of the secret protocol signed in August 1938 between Berlin and Moscow. For the first time since the establishment of the Belarusian Soviet state, the territory of Belarus was brought together in a formally Belarusian political state. The installation of the Soviet regime in West Belarus was accompanied by deportations. Many of the Belarusians serving in the Polish army were taken by the Soviets as prisoners of war along with Polish soldiers.
On June 22, 1941, Germany attacked the Soviet Union, and within two months the entire territory of Belarus was occupied by the Germans. They partitioned the country by apportioning swaths of territory to Lithuania, East Prussia, and Ukraine, while central and eastern Belarus were turned into civil and military zones, respectively. Life under German occupation was characterized by Soviet guerrilla warfare, Nazi extermination camps, and the struggle of nationalists caught between the Communists and the Germans. As to the civil administration of Belarus, a number of organizations and institutions were set up to foster national aspirations and defend local interests, while not counteracting the occupying authorities. Collaborationism, mostly from those who had suffered under the Communists, was on a moderate scale, largely because of the brutal German policies and genocidal actions toward Jews and the population of the guerrilla country, where entire villages and their inhabitants were burned. West Belarus was a site of military operations by the Polish Home Army, whose fighting strategy, including acts of terror against Belarusian teachers and members of the local administration, was dictated by the plan to secure the inclusion of West Belarus into a postwar Polish state.
As a result of World War II, Belarus lost more than 2.2 million people, including nearly 380,000 deported to Germany as laborers. Material losses were also immense: 209 cities and townships and 9,200 villages had been destroyed. According to a specialist, Andrej Bahrovič, Belarus's overall demographic deficit of the 1939-1959 period was over 6 million. Afraid of Soviet retribution, tens of thousands of Belarusians fled to the West with the retreating German army. Many of them settled in Western countries as political refugees after the end of the war (see Diaspora). During the first two postwar years, over 450,000 Belarusians, especially Catholics, resettled to Poland, escaping the repressive Soviet regime. Only in 1971 did Soviet Belarus managed to restore its prewar population level. One of the unforeseen results of World War II was Belarus's United Nations membership, which was a recognition of the country's contribution to the victory over Nazi Germany and, as a side effect, enhanced a sense of national self-awareness.