an Entity references as follows:
Bad Mergentheim (German: [baːt ˈmɛʁɡn̩thaɪm]; Mergentheim until 1926; East Franconian: Märchedol) is a town in the Main-Tauber-Kreis district in the German state of Baden-Württemberg. It has a population of around 23,000. An officially recognized spa town since 1926, Bad Mergentheim is also known as the headquarters of the Teutonic Order from 1526 until 1809.