Against the wishes of its governor and commander, Eric of Brunswick-Wolfenbüttel, Memel adopted Lutheranism after the conversion of Hohenzollern Margrave of Brandenburg Albert of Prussia and the creation of the Duchy of Prussia as a fief of the Crown of the Kingdom of Poland in 1525. It was the onset of a long period of prosperity for the city and port. It served as a port for neighbouring Lithuania, benefiting from its location near the mouth of the Neman, with wheat as a profitable export. The Duchy of Prussia was inherited by a relative, John Sigismund, the Hohenzollern prince-electors of the March of Brandenburg in 1618. Brandenburg-Prussia began active participation in regional policy, which affected the development of Memel. From 1629–1635, the town was occupied by Sweden over several periods during the Polish-Swedish War of 1625–1629 and the Thirty Years' War.