By the end of the 1930s the four factories of Hajnówka had 1947 workers altogether and were significantly expanded. The state financed construction of several hundred small houses for the workers and the town grew up rapidly. Also, the town attracted many notable Polish architects of the epoch to build new buildings in modernist style. However, the progress was stopped by the Polish Defensive War of 1939 and the outbreak of World War II. In the effect of the Nazi-Soviet Alliance, the town was annexed by the Soviet Union. The factories were dismantled and sent to Russia while a large part of the inhabitants were in 1940 arrested by the NKVD and imprisoned in the Soviet Gulag system. On 25 June 1941 the town got under German occupation, which ended on 18 July 1944. During the fights the town was severely bombed, which added to the destruction of the city. All in all, until July 18, 1944, more than 700 inhabitants of Hajnówka lost their lives, the factories were robbed and then demolished, while the train station and parts of the town centre were levelled by aerial bombardment.