Consequently, there were many riots, but ultimately these were suppressed by local orders. Originally, in terms of administration, by the Reichsdeputationshauptschluss the town was part of Baden. However, the knightly diocese of Wimpfen im Tal belonged to Hesse-Darmstadt. Consequently, a conflict about sovereignty rights over the parish increased between Baden and Hesse. Finally Baden agreed to cede the area, since their own territory was far away – and so Wimpfen under Hessian rule. This change was officially proclaimed on April 5, 1803. Starting in 1805–1806 Wimpfen was an outlying town under the control of Hesse. For Wimpfen, this was a very comfortable situation as it was able to administer itself autonomously. At the time of the foundation of the People's State of Hesse in 1919, Wimpfen became part of the district of Heppenheim. It was merged with the district of Bensheim in 1938 and given the status of Kreis Bergstraße. In total, Wimpfen belonged to Hesse for 140 years. In 1945 the American military government reorganised administrational areas, and Bad Wimpfen came again under the control of Baden. Salt production and bathing In 1752 the first bore-holes were drilled for salt-water. In 1817 a permanent salt production works was established. The brine was usually able to be used therapeutically, and in 1835 the first therapeutic hotel opened (Mathilden Spa Hotel). A new economic prosperity began, and a new town hall was built in 1836. Many of the older Staufer buildings were destroyed at this time or fell into disrepair or disuse. After the opening of the new rail road, running from Heilbronn to Heidelberg, in the 1860s, the spa business increased greatly. Therapeutic baths were expanded more and more, resulting in a major economic growth. Even Mark Twain reported this fact within accounts of his journey through Europe in 1867. On April 26, 1930, the town got its prefix Bad officially. The town survived World War II almost undamaged, and many refugees came here for accommodation. Between Hesse and Baden-Württemberg On September 19, 1945, the American military government proclaimed the foundation of Greater Hesse and Württemberg-Baden. Now the area was completely surrounded by Württemberg-Baden, namely by the districts of Sinsheim and Heilbronn belonging to Baden area of Württemberg. On November 26 the occupying American officials decided to transfer control of Wimpfen to the district of Sinsheim. Eventually the town legally became a part of Württemberg-Baden, this being confirmed by the