The outbreak of the war with Nazi Germany freed Gomułka from his prison confinement. On 7 September 1939, he arrived in Warsaw, where he stayed for a few weeks, working in the besieged capital on the construction of defensive fortifications. From there, like many other Polish communists, Gomułka fled to eastern Poland which was invaded by the Soviet Union on 17 September 1939. In Białystok he ran a home for former political prisoners arriving from other parts of Poland. To be reunited with his luckily found wife, at the end of 1939 Gomułka moved to Soviet-controlled Lviv.