The success of Louis in his war with Frederick was to some extent due to the imperial cities, which supported him from the first. Not only did they pay high taxes, but they made splendid voluntary contributions, thus enabling the sovereign of their choice to continue the fight. But Louis was perhaps still more indebted for his victory to the memorable conflict between the Swiss and the Habsburgs, the defeat of Leopold of Austria at Morgarten in 1315 striking a heavy blow at his position. Thus this struggle for freedom, although belonging properly to the history of Switzerland, exercised much influence on the course of German history.
Had Louis been wise and prudent, it would have been fairly easy for him to attain a strong position after his victory at Mühldorf. But he threw away his advantages. He offended John of Bohemia, who had aided him at Mühldorf, thus converting a useful friend into a formidable foe, and his other actions were hardly more judicious. John was probably alarmed at the increase in the power of the German king, and about the same time a similar fear had begun to possess Pope John XXII. and Charles IV. of France. About 1323 Louis had secured the mark of Brandenburg for his son Louis, and he was eager to aggrandize his family in other directions. It was just at the time when he had estranged John of Bohemia that the pope made his decisive move. Asserting that the German crown could only be worn by one who had received the papal approbation he called upon Louis to lay it down; the answer was an indignant refusal, and in 1324 the king was declared deposed and excommunicate. Thus the ancient struggle between the Papacy and the Empire was renewed, a struggle in which the pen, wielded by Marsiglio of Padua, William of Occam, John of Jandun and others, played an important part, and in which the new ideas in religion and politics worked steadily against the arrogant papal claim. The pope and his French ally, Charles IV., whom it was proposed to seat upon the German throne, had completely misread the signs of the times, and their schemes met with very little favour in Germany. No longer had the princes as in former years any reason to dread the designs of an ambitious king; the destinies of the kingdom were in their own hands and they would not permit them to be controlled by an alien power. Such was the attitude of most of the temporal princes, and many spiritual princes took the same view. As for the electors, they had the strongest possible motive for resisting the papal claim, because if this were once admitted they would quickly lose their growing importance in the state. Lastly, the cities which had stood behind the Empire in the most difficult crises of its contest with Rome were not likely to desert it now.