at Cannstatt, lying in the Turgowe (Thurgau) dominated by Konstanz. A Carolingian castle, built on the site of the now ruined Roman castle by the grandson of Charlemagne, Louis the German, is mentioned in 835 ("in castro Turicino iuxta fluvium Lindemaci"). Louis also founded the Fraumünster abbey on 21 July 853 for his daughter Hildegard. He endowed the Benedictine convent with the lands of Zürich, Uri, and the Albis forest, and granted the convent immunity, placing it under his direct authority. In the wake of this, during the 9th century, Zürich gradually acquired the characteristics of a medieval city. It was now the center of the separate county of Zürichgau, detached from the older county of Thurgau. The early city was dominated by the Fraumünster convent. In 1045, King Henry III granted the convent the right to hold markets, collect tolls, and mint coins, and thus effectively made the abbess the ruler of the city. The Frankish kings had special rights over their tenants, were the protectors of the two churches, and had jurisdiction over the free community. In 870 the sovereign placed his powers over all four in the hands of a single official (the Reichsvogt), and the union was still further strengthened by the wall built round the four settlements in the 10th century as a safeguard against Saracen marauders and feudal barons. Zürich became reichsunmittelbar (direct control of the emperor) in 1218 with the extinction of the main line of the Zähringer family. A city wall was built during the 1230s, enclosing 38 hectares (about 94 acres). The Bahnhofstrasse marks the course of the western moat, Hirschengraben marks the eastern moat. The earliest citizens' stone houses at the Rennweg date to this period, using the dilapidated Carolingian castle as a quarry. Emperor Frederick II promoted the abbess of the Fraumünster to the rank of a duchess in 1234. The abbess assigned the mayor, and she frequently delegated the minting of coins to citizens of the city. The Reichsvogtei passed to the counts of Lenzburg (1063–1173), and then to the dukes of Zahringen (extinct 1218). Meanwhile, the abbess of the Benedictine Frau Münster had been acquiring extensive rights and privileges over all the inhabitants, though she never obtained the criminal jurisdiction. The town flourished greatly in the 12th and 13th centuries, the silk trade being introduced from Italy. In 1218 the Reichsvogtei passed back into the hands of