In 1525 during the Protestant Reformation, in accordance to the Treaty of Kraków, the Grand Master of the Teutonic Knights, Albert, secularized the order's Prussian territory, becoming Albert, Duke of Prussia. As the region had been an integral part of the Kingdom of Poland since the Second Peace of Thorn (1466), King of Poland Sigismund I the Old, as its suzerain, granted the territory as a hereditary fief of Poland to Duke Albert per the Treaty of Kraków, a decision that was sealed by the Prussian Homage in Kraków in April 1525. The new duke established Lutheranism as the first protestant state church. The capital remained in Königsberg (, , modern Kaliningrad). The duchy was inherited by the Hohenzollern prince-electors of Brandenburg in 1618. This personal union is referred to as Brandenburg-Prussia. Frederick William, the "Great Elector" of Brandenburg, achieved full sovereignty over the duchy under the 1657 Treaty of Wehlau, confirmed in the 1660 Treaty of Oliva. In the following years, attempts were made to return to Polish suzerainty, especially by the capital city of Königsberg, whose burghers rejected the treaties and viewed the region as part of Poland”. The Duchy of Prussia was elevated to a kingdom in 1701.