The town of Tykocin was conquered by Nazi Germany during the Soviet and German invasion of Poland pursuant to their secret agreement known as the Molotov–Ribbentrop Pact. At the end of September 1939, the area was transferred by the Nazis to the Soviet Union in accordance with the German–Soviet Boundary Treaty. In June 1941, the town was taken by the Germans in Operation Barbarossa.