The remote valley was settled by Bavarian peasants in the 9th century; field names in the highest-lying southern parts also denote a Carantanian (Slavic) colonization. Gastein is first mentioned as "Gastuna" in a 963 deed, when the area belonged to the German stem duchy of Bavaria. It was originally an alpine farming and gold mining area and the site of an ancient trade route crossing the main ridge of the Central Eastern Alps. In 1297 Duke Otto III and his brother Stephen I, both highly indebted, sold it to the Prince-Archbishops of Salzburg. Already about 1230, the minnesinger Neidhart von Reuental had referred to the hot springs in his Middle High German poem "Die Graserin in der Gastein"; the spas were visited by the Habsburg emperor Frederick III as well as by the Renaissance physician Paracelsus.