The Free City of Strasbourg remained neutral during the Thirty Years' War. In September 1681 it was annexed by King Louis XIV of France, whose unprovoked annexation was recognized by the Treaty of Ryswick (1697). The official policy of religious intolerance which drove most Protestants from France after the revocation of the Edict of Nantes (1598) by the Edict of Fontainebleau (1685) was not applied in Strasbourg and in Alsace, because both had a special status as a province à l'instar de l'étranger effectif (a kind of foreign province of the king of France). Strasbourg Cathedral, however, was restored from the Lutherans to the Catholics and the French authorities tried to promote Catholicism wherever they could. The German Lutheran university persisted until the French Revolution. Famous students were Goethe and Herder.
During a dinner in Strasbourg organized by Mayor Frédéric de Dietrich on 25 April 1792, Claude Joseph Rouget de Lisle composed "La Marseillaise". However, Strasbourg's status as a free city was revoked by the French Revolution.Enragés, most notoriously Eulogius Schneider, ruled the city with an increasingly iron hand. During this time, many churches and cloisters were either destroyed or severely damaged. The cathedral lost hundreds of its statues (later replaced by copies in the 19th century) and in April 1794, there was talk of tearing its spire down, on the grounds that it hurt the principle of equality. The tower was saved, however, when in May of the same year citizens of Strasbourg crowned it with a giant tin Phrygian cap. This artifact was later kept in the historical collections of the city until they were all destroyed in 1870.
In 1805, 1806 and 1809, Napoléon Bonaparte and his first wife, Joséphine stayed in Strasbourg. In 1810, his second wife Marie Louise, Duchess of Parma spent her first night on French soil in the palace. Another royal guest was King