A part of the Grand Duchy of Posen from 1815 on, the town was again incorporated into the Prussian Province of Posen in 1848. According to the 1919 Treaty of Versailles, Fraustadt remained under German rule and formed the southernmost district of the Posen-West Prussia border province till 1 October 1938, when the province was dissolved. It was become district center in province of Silesia till 1941, later in one of Lower Silesia. Fraustadt was one of the few areas within Germany attacked by the Polish military during the Polish Defensive War in 1939 (or Polish Campaign'1939). For a few hours its neighboring town of Geyersdorf (now Dębowa Łęka) was the first German town to be occupied by enemy forces in the war. The other notable attack was carried on the same day by one PZL.23B of the 21st Squadron; the factory in Ohlau was the first victim of bomb attack onto the German territory. Fraustadt was occupied by Red Army in 1 February 1945. Since 1945 the area as a result of the 1945 Potsdam Conference belongs to Poland. It was initially part of Okreg III (compromising present West Pomeranian and Lubusz provinces) between 1945 and 1946, laterly a county (powiat) center in Poznan Voivodeship between 1946 and 1950 and later in Zielona Gora Voivodeship between 1950 and 1975. It was finally a commune (gmina) center in Leszno Voivodeship between 1975 and 1999 before creation of Lubusz province. It became again a country center after 24 years.