Bald of Legnica took the occasion, had his nephew Henry seized at Jelcz and imprisoned him in 1277. Fortunately for Henry IV, the reaction to his imprisonment was indignation. Ottokar's Polish allies, Duke Henry III of Głogów and Duke Przemysł II of Greater Poland attempted to enforce Henry IV's liberation. The Bohemian king however only sent febrile appeals and request for release. Henry IV's allies were defeated by Duke Bolesław II 's son Henry V the Fat in the bloody Battle of Stolec (24 April 1277), where both Dukes Przemysł II and Henry III were captured. Henry IV could obtain his freedom only at the end of the year, when he finally decided to capitulate after hearing the defeat of his main ally King Ottokar II against the Imperial and Hungarian troops at the 1278 Battle on the Marchfeld. Henry IV was forced to give Bolesław II one-third of his duchy including the towns of Środa Śląska and Strzegom and forced to pledge Krosno Odrzańskie, which he had obtained from the Dukes of Głogów in 1273–1274, in order to obtain the money for his ransom. Ottokar II's death. Attempts to obtain the Regency of Bohemia While Henry himself did not take part in the Battle on the Marchfeld, he had sent reinforcements to King Ottokar II, whose death was a serious blow to the Wrocław duke. After hearing the news of Ottokar's death, Henry IV went to Prague and attempted to gain the guardianship of the king's son Wenceslaus II, as one of his closest relatives (Henry IV's paternal grandmother was Anna of Bohemia, a daughter of late King Ottokar I) and ally. He was however not successful due to the actions of King Rudolph I of Germany, who in his capacity as King of the Romans had given the regency over Bohemia to the Ascanian margrave Otto V, Margrave of Brandenburg-Salzwedel. As compensation, the German king gave Henry IV the Bohemian County of Kladsko as a fief. Homage to King Rudolph I in 1280 Upon the death of his Bohemian ally, Henry IV reconciled with King Rudolph I and in 1280 went to his Austrian court in Vienna, where Henry tried to obtain for himself the Polish royal crown. Some historians believed that the Duke of Wrocław took the opportunity from his homage to King Rudolph I to expose him the possibility of becoming King of Poland. At that