During the Alemanni period Bad Urach had an important castle. Owing to its prime location on a hill overlooking the Erms Valley, Hohenurach Castle was built around 1025. In the Middle Ages Bad Urach (at that time only known as Urach) became a centre of power. The castle became a state prison in the late Middle Ages; the poet Philipp Nikodemus Frischlin died while trying to escape over its walls in 1590. In the 18th century, the fortress was razed to the ground by the citizenry.