During the city's conquest by the Soviet Army in the early months of 1945, a substantial number of citizens fled or were killed. In 1945, the city officially became part of Poland in accordance with the Potsdam Agreement. In the period immediately after the war, many surviving Germans were expelled to West or East Germany, while members of the pre-war Polish ethnic minority started returning and new Polish settlers began to come. Due to these events, Gdańsk suffered severe underpopulation and did not recover until the late 1950s.