After World War II Nazi Germany west of the Oder-Neisse line was divided into four occupation zones.
They were occupied by the allied powers who defeated Germany (the Soviet Union, the United Kingdom and the United States) and by France. This was done for administrative purposes during the period 1945-1949.
In the closing weeks of fighting in Europe the American forces had actually pushed beyond the previously agreed upon occupation zone boundaries, sometimes by as much as 200 miles. After about two months of holding certain areas meant to be in the Soviet zone, the American forces withdrew in July 1945.