In the course of the high medieval town construction, the settlement of Zug also received a town wall at some point after 1200. The town founders were probably the counts of Kyburg. The town, first mentioned in AD 1240, was called an "oppidum" in 1242 and a "castrum" in 1255. In 1273, it was bought by Rudolph of Habsburg from Anna, the heiress of Kyburg and wife of Eberhard, head of the cadet line of Habsburg. Through this purchase it passed into the control of the Habsburgs and was placed under a Habsburg bailiff. The "Aeusser Amt" or Outer District consisted of the villages and towns surrounding Zug, which each had their own "Landsgemeinden" but were ruled by a single Habsburg bailiff. Zug was important as an administrative center of the Kyburg and the Habsburg district, then as a local market place, and, thereafter, as a stage town for the transport of goods (particularly salt and iron) over the Hirzel hill towards Lucerne.