Frederick II, ruler of the Holy Roman Empire in the 13th century, realised that his dynasty was losing its power and granted freedoms to many cities in order to keep their allegiance. These cities became Free imperial cities and Sélestat became one of them in 1217. Under the new status Sélestat was able to build city walls and collect taxes on its own. Its serfs and settlers were freed. The German monarch Adolf of Nassau granted Sélestat a constitution in 1292. It was amended many times but it regulated local politics until 1789. Although the new status favoured trade and prosperity, free cities in Alsace were afraid that they would not be defended by imperial forces if a conflict was to occur. So they decided to form an alliance called the Decapolis in 1354, which comprised ten cities: (Haguenau, Colmar, Wissembourg, Turckheim, Obernai, Kaysersberg, Rosheim, Munster, Sélestat and Mulhouse). The seat of the alliance was in Haguenau but its archives were kept in Sélestat. Because the town was the most centrally located, it often hosted meetings of the association.