Emperor Friedrich Barbarossa held court in Seligenstadt in 1188. During his reign the community acquired town rights (around 1175). A royal court (or "Kaiserpfalz") was built on the banks of the Main during the reign of the Staufer family, however it is not certain whether this occurred under Barbarossa or one of his successors, possibly Friedrich II. Until 1309, Seligenstadt was a "freie Reichsstadt". At that point, it came to the Archbishop of Mainz who remained the town's ruler until 1803.