The Battle of Gammelsdorf (German: Schlacht von Gammelsdorf) circled around the question of who would execute tutelage over the minor children of the late Lower Bavarian Dukes, thus also commanding the tremendous economic power of that region. Their Upper Bavarian cousin, Duke Louis, the later Emperor Louis IV, the Bavarian, as agreements within the several branches of the Bavarian line of the House of Wittelsbach determined and as the burghers of the Lower Bavarian cities wanted to see it done, or Duke Frederick I of Austria, the Fair, also Louis' cousin, both having been raised and educated together in Vienna, as the widows and local aristocracy wished?
After Louis had militarily occupied the then two most important towns all over Bavaria, Landshut and Straubing, the ducal widows decided to call their children's Austrian cousin for assistance, although in the decade before, Lower Bavaria had bitterly fought Austria over lands, economic resources and souvereignity. Finally, the decisive battle for control over those fertile, economically attractive lands was fought at Gammelsdorf on 9 November 1313 between Bavaria and Austria. The Upper Bavarians and troops deputized by the Lower Bavarian towns were led by Duke Louis, while the aristocracy and knighthood of Lower Bavaria and the Austrians were led by the Duke Frederic.
At the end of the day, Louis was victorious, while the other side suffered a severe military defeat. Frederick was forced to renounce his tutelage over the Lower Bavarian dukes, and maybe even more important for the man from Munich, he had put a halt on Habsburgian desires for annexation of parts of Bavaria for a long time.