Ernye fought in the royal army in a war against Austria in 1246 and participated in the Battle of the Leitha River, where Frederick the Quarrelsome was killed. In the battle, Ernye killed a "famous Austrian knight" with his spear, and presented his severed head to the Hungarian king. He also took part in a campaign against Austria in 1250, when Béla made a plundering raid into Austria and Styria in the summer of 1250, in retaliation of a former Austrian incursion into Hungary. He participated in the sieges of Waltersdorf and Kirchschlag. Subsequently Ernye dueled with Austrian knight Wernhard Preussel, the captain of Lower Austria and lord of Himberg. Ernye pushed him off the horse with his lance, instantly killing him. Thereafter the Hungarian troops besieged and seized the castle.