Treaty of Rastatt
It then remained the residence of the margraves of Baden-Baden until 1771. It was the location of the First and Second Congress of Rastatt, the former giving rise to the Treaty of Rastatt while the second ended in failure in 1799. In the 1840s, Rastatt was surrounded by fortifications to form the fortress of Rastatt. For about 20 years previous to 1866, it was occupied by the troops of the German Confederation.