Elections to the People's Assemblies of Western Ukraine and Western Belarus, which took place on October 22, 1939, were an attempt to legitimize the annexation of the Second Polish Republic by the Soviet Union following the September 17 Soviet invasion of Poland in accordance with the secret protocol of the Molotov-Ribbentrop Pact. Only one month after the eastern territories of Poland were occupied by the Red Army, the Soviet secret police and military led by the Party officials staged the local elections in an atmosphere of state terror. The referendum was rigged. The ballot envelopes were numbered and often handed over already sealed. By design, the candidates were unknown to their constituencies which were brought to the voting stations by armed militias. The results were to become the official legitimization of the Soviet takeover of what is known today as the West Belarus and the Western Ukraine. Consequently, both Assemblies voted for incorporation of all formerly Polish voivodeships into the Soviet Union.
On September 17, 1939, the Red Army invaded eastern Poland, facing weak resistance of units of the Border Defence Corps, scattered along the border. The Soviets moved quickly westwards, towards the line of partition of Poland, established earlier, during Soviet - Nazi negotiations. After the invasion, the Second Polish Republic and Soviet Union found themselves de facto at war with each other, and Soviet authorities took advantage of the situation, to make permanent changes of the legal order of occupied territories. Their activities broke Article 43 of the 1907 Hague Convention, which states: "The authority of the legitimate power having in fact passed into the hands of the occupant, the latter shall take all the measures in his power to restore, and ensure, as far as possible, public order and safety, while respecting, unless absolutely prevented, the laws in force in the country".
As soon as the Soviets occupied Polish areas, they began organizing local governments and units of administrative division, whose borders roughly corresponded with the borders of interbellum voivodeships. Temporary authorities were made of NKVD agents, Red Army officers, local laborers, and left-wing intelligentsia. Their task was to organize the so-called workers guard in the municipal centers, and farmers committees, which were preparing land reform. Soon afterwards, these temporary authorities were replaced with Soviet-style administration and Communist Party of the Soviet Union committees. Also, NKVD apparatus took over military tasks.