On July 13th - August 29th 1944 the Soviet administration conducted the Lviv-Sandomyr offensive campaign, aiming to seize Western Ukraine and to enter the territory of Poland. The battle near the city of Brody (July 16-22) played the most crucial role in this campaign. As a result of fighting between the troops of the 1st Ukrainian front and parts of Vehrmacht troops (division SS "Halychyna" fought on their side), the German troops were driven out from the territory of Western Ukraine.
The territory of the Ukrainian SSR underwent fundamental changes after the end of the German-Soviet war. On June 29th, 1945, the USSR and Czechoslovakia signed a treaty, according to which Carpatho-Ukraine was added to the territory of the Ukrainian SSR. On August 16th, 1945, the Soviet Union signed the treaty with Poland, according to which Lemkivshchyna, Kholmshchyna, Posyannya and Pidlyashshya were added to the territory of the People's Republic of Poland; Galicia and Volyn were to be a part of the USSR.
In the post-war period the Stalin regime conducted the policy of forced Sovietization of the newly added Ukrainian territory. After the Red Army came to Galicia and Volyn, party and state official bodies were resumed, district and regional bodies of the Communist Party of Ukraine were organized. Western Ukrainian cities were soon undergoing Sovietization due to the Russian population. According to the estimates of the historian A.Marianskyy, in the first post-war decade, one million people (among them Russians and people from Eastern Ukraine) were resettled in Western Ukrainian regions. Those people arrived as specialists in national economy and as representatives of the administration of the Empire.