As the division of the duchy was against the law, it caused anger of the Bishops in Bavaria who allied with Ottokar II of Bohemia in 1257. In August 1257, Ottokar invaded Bavaria, but Henry and Louis managed to repulse the attack. It was one of the rare concerted and harmonious actions of both brothers who often argued. Henry was also later several times at war against the Archbishopric of Salzburg and the Bishop of Passau. During the conflict of King Rudolph I of Germany with Ottokar II, Duke Henry repeatedly changed allegiance.