 The latter was able to use this tax and a dynastic marriage to his advantage to gain back full control of Upper Alsace (apart from the free towns, but including Belfort) in 1477 when it became part of the demesne of the Habsburg family, who were also rulers of the empire.The town of Mulhouse joined the Swiss Confederation in 1515, where it was to remain until 1798.By the time of the Protestant Reformation in the 16th century, Strasbourg was a prosperous community, and its inhabitants accepted Protestantism in 1523.