Although the settlement had an important castle not only guarding the Prussian lands of the State of the Teutonic Order from the north but also serving as a military base for the Knights' campaigns into adjacent Samogitia, it was living in the shadow of the nearby city of Tilsit (present-day Sovetsk). After the dissolution of the Order's State under its last Grand Master Albrecht von Hohenzollern, Ragnit on April 10, 1525 became a part of the Duchy of Prussia, which was ruled by the House of Hohenzollern as a fief of the Polish Crown until 1657. The duchy was inherited by the Hohenzollern margraves of Brandenburg in 1618, becoming an integral part of Brandenburg-Prussia, whereby remote Ragnit retained its status as a regional capital.