The most important seat of the Esterházys was Kismarton (today Eisenstadt, Austria), since the heads of the family chose to make a castle in this tiny village their primary residence. A fortified stronghold had been built there in the 14th century; after the Esterházys acquired it they rebuilt it 1663–1672 to what is now the princely Schloss Esterházy. Their practical reason for choosing to create and maintain the princely court at Eisenstadt may have been that while the region was in Hungary, it had been mainly settled by Germans, and was situated rather close to the Habsburgs' Imperial residence, Vienna. (The region remained part of Hungary until 1921, when it was handed over to Austria according to the Treaty of Saint-Germain, 1919, and the Treaty of Trianon, 1920.)