Shortly after, the same year, he went to war serving under King Gustavus II Adolphus of Sweden at his invasion in Ducal Prussia in the course of the Polish–Swedish War (1626–1629). He achieved recognition by Gustavus Adolphus before he was home in Denmark again in November 1628. Meanwhile, the Catholic Leaguist troops under Albrecht von Wallenstein had conquered most of Jutland forcing Christian IV to sign the Treaty of Lübeck on 22 May 1629, stipulating that Christian IV on his own and his sons' behalf renounced their prince-episcopal positions. Thus Ulrik lost the Schwerin see.