Cieszyn developed around a stronghold established between the 9th and 10th centuries. Since 1290, it was the capital of the independent Duchy of Cieszyn and from 1653 it was ruled by the princes from the Piast dynasty. Later, the Habsburgs took control and governed the duchy until 1918.