During the invasion of Poland by Nazi Germany and the Soviet Union at the onset of World War II, Łomazy was taken over by the Red Army and passed on to the Germans in the Nazi-Soviet boundary treaty. A Jewish exploitation ghetto was created in Łomazy in early 1940.