The Swiss opened the fight. Attacked by the Habsburgs they defeated and killed Duke Leopold of Austria at Sempach in July 1386 and gained another victory at Näfels two years later; but their allies, the Swabian cities, were not equally prompt or equally fortunate. The decisive year was 1388, when the strife became general all over south-west Germany. In August 1388 the princes, under Count Eberhard of Württemberg, completely defeated their foes at Döffingen, while in the following November Rupert II., elector palatine of the Rhine, was equally successful in his attack on the forces of the Rhenish cities near Worms. Exhaustion soon compelled the combatants to come to terms, and greatly to the disadvantage of the cities peace was made in 1389. The main result of this struggle was everywhere to strengthen the power of the princes and to incite them to fresh acts of aggression. During the same time the Hanse towns were passing through a period of difficulty. They were disturbed by democratic movements in many of the cities and they were threatened by the changing politics of the three northern kingdoms, Norway, Sweden and Denmark, and by their union in 1397; their trading successes had raised up powerful enemies and had embroiled them with England and with Flanders, and the Teutonic Order and neighbouring princes were not slow to take advantage of their other difficulties.
Towards the close of the century the discontent felt at the incompetent and absent German king took a decided form. The movement was led by the four Rhenish electors, and after some preliminary proceedings these princes met in August 1400; having declared Wenceslaus dethroned they chose one of their number, the elector palatine Rupert III., in his stead, and the deposed monarch accepted the sentence almost without demur. Rupert was an excellent elector, and under more favourable circumstances would have made a good king, but so serious were the jealousies and divisions in the kingdom that he found little scope for his energies outside the Palatinate. In spite of the peace of 1389 the cities had again begun to form leagues for peace; but, having secured a certain amount of recognition in the south and west of Germany, the new king turned aside from the pressing problems of government and in 1401 made a futile attempt to reach Rome, an enterprise which covered him with ridicule. After his return to Germany he had to face the hostility of many of the princes, and this contest, together with vain attempts to restore order, occupied him until his death in May 1410.