At first, Sélestat was a major strategic stronghold for the French. Located near the Rhine, it controlled the access to the Vosges mountains and the rest of France. Vauban, the foremost military architect at that time, rebuilt the town walls between 1675 and 1691. However, after the conquest of Strasbourg in 1681 Sélestat lost much of its strategic importance, as Strasbourg was better located. But it remained a garrison town, and the troops stationed there helped to improve the faltering local economy. Although Protestantism was not forbidden in Alsace, French authorities largely encouraged Catholicism and opened three new convents in Sélestat. Jews were expelled from the town in 1642. During the French Revolution the population was extremely conservative and opposed to change. The new territorial organisation confirmed the decline of the town, which did not become a prefecture and was not distinguished as a subprefecture until 1806, when it replaced Barr in that capacity. Sélestat suffered from the Napoleonic wars as it was besieged and bombed by the Bavarians in 1814 and blockaded by a German coalition in 1815.