in 1621 the duchy of mecklenburg was formally divided between the two brothers, with adolf frederick ruling in mecklenburg-schwerin and john albert ruling in mecklenburg-güstrow. during the thirty years' war, albrecht von wallenstein ousted the dukes after they secretly sided with king christian iv of denmark against holy roman emperor ferdinand ii. wallenstein ruled the duchies from 1627 until 1631, when the dukes were restored by the swedes under king gustavus adolphus. in 1634 adolf frederick succeeded ulrik of denmark as last administrator of the prince-bishopric of schwerin before its secularisation.