Kozakowice is actually two villages: Upper Kozakowice (Kozakowice Górne) and Lower Kozakowice (Kozakowice Dolne). It has a population of about 650 and was first mentioned in a written document in 1305.
Goleszów is a village and the seat of Gmina Goleszów (an administrative district) in Cieszyn County in Silesian Voivodeship, southern Poland. It has a population of about 4,000.
It was first mentioned in a written document in 1223, and in 1293 a stone church was built there. Goleszów became an important railway junction and during World War II a subcamp of Auschwitz concentration camp operated there.
The Duchy of Cieszyn became part of the Austrian Empire in 1804 and a Cisleithanian crown land of the Austro-Hungarian Empire in 1867. At the end of World War I the duchy was disestablished with the dissolution of the Austro-Hungarian Empire.
Local Polish and Czech self-governments were established on the territory of Cieszyn, which on 5 November 1918 signed an interim agreement according to which the territory - including the town of Cieszyn itself - was divided along the Olza river. The convention however failed to settle the border conflict between the newly established state of Czechoslovakia and the Second Polish Republic claiming further areas of the former Cieszyn duchy with a predominantly Polish speaking population. The ongoing conflict escalated when Czechoslovak troops crossed the Olza river on 23 January 1919 starting the Polish–Czechoslovak War.
Clashes of arms endured until 31 January, from which none of the belligerents could derive much of a benefit, as at the 1920 Spa Conference the division of the former duchy along the Olza was confirmed. The eastern part of Cieszyn was incorporated into the Polish Autonomous Silesian Voivodeship, while the western Zaolzie region became part of Czech Silesia.
(Within the Austro-Hungarian Empire (Austria-Hungary) from 1867 to 1918).