On 21 August 1245 Pope Innocent IV freed Béla of the oath of fidelity he had taken to Emperor Frederick during the Mongol invasion. In the following year Duke Frederick II of Austria invaded Hungary. He routed Béla's army in the Battle of the Leitha River on 15 June 1246, but perished in the battlefield. His childless death gave rise to a series of conflicts, because both his niece, Gertrude, and his sister, Margaret, made a claim to Austria and Styria. Béla decided to intervene in the conflict only after the danger of a second Mongol invasion had diminished by the end of the 1240s. In retaliation of a former Austrian incursion into Hungary, Béla made a plundering raid into Austria and Styria in the summer of 1250. In this year he met and concluded a peace treaty with Daniil Romanovich, Prince of Halych in Zólyom (Zvolen, Slovakia). With Béla's mediation, a son of his new ally Roman married Gertrude of Austria.