Flensburg was founded at the latest by 1200 at the innermost end of the Flensburg Firth by Danish settlers, who were soon joined by German merchants. In 1284, its town rights were confirmed and the town quickly rose to become one of the most important in the Duchy of Schleswig. Unlike Holstein, however, Schleswig did not belong to the German Holy Roman Empire. Therefore, Flensburg was not a member of the Hanseatic League, but it did maintain contacts with this important trading network.