 Documentary evidence of the city's existence first appeared in 1269 when Stephen V, King of Hungary and Duke of Transilvania, mentioned "the royal castle of Deva" in a privilege-grant for the Count Chyl of Kelling ().Partially destroyed by the Ottoman Turks in 1550, it was afterward rebuilt and the fortress extended.In 1621 Prince Gabriel Bethlen transformed and extended the Magna Curia Palace (also known as the Bethlen Castle) in Renaissance style.