According to Carswers, Charles IV reaped the fruits of the alliance with the electors when they, in derogation of the rules of the Golden Bull, agreed to elect the eldest son Wenceslaus as his successor (10 June 1376). The friendship of France, so necessary in order not to have obstacles in his family policy, was paid by the emperor with the appointment of the son of the French king as imperial vicar in the kingdom of Arles, a makeshift that badly covered the definitive renunciation of the Empire to Rhone valley in favor of France, which, on the other hand, from 1316 the Valentinois and Diois had annexed, and from 1349 the Dauphiné. Yet in 1365 Charles IV seemed to have wanted to claim imperial rights over those regions, taking the crown in Arles, a fact that had not occurred since 1178, when Frederick I was crowned there. Meanwhile, the effects of the absence of a central government in Germany, already severely tested by the plague of 1348, they manifested themselves in the raging wars between leagues of cities and leagues of nobles. The emperor, to protect the peace, found nothing better than to help himself with the work of the judges of theWestphalian veme. In the last years of his reign a terrible struggle broke out between the Swabian cities, tight in league (1370) around Ulm, and the nobles of the countryside, led by Count Eberard of Württemberg, and favored by the emperor. The war, after having dragged on for a long time with various alternatives, ended in 1377 with the worst of the nobles. The following year the emperor died (November 29, 1378).
It was not long before southern Germany was again the scene of ferocious wars between leagues of cities and nobles, which also extended to western Germany. The league of the Swabian cities was joined (1381) by a league of the Rhenish cities; to that of the nobles, a confederation of the four Rhine princes; in 1385 the Swiss Confederates allied themselves to the German cities, and the struggle flared up everywhere (1388), with the intervention of the Habsburgs too. The Swiss, victorious in Sempach (9 July 1386) and Naefels (9 April 1388), with the peace of 1394 obtained the de facto recognition of their independence. Instead the German cities were overwhelmed, the Swabians in Döffingen by Count Eberard of Württemberg (23 August), the Rhenish ones in Worms by the Count Palatine of the Rhine, Robert of Wittelsbach (6 November 1388), and were prostrated by the blow suffered. Weakened also by the internal struggles between the upper and lower classes, launched to conquer the municipal administration, the cities will tend to ignore political problems in order to occupy themselves above all with economic activities. The course of the conflict had clearly shown the impotence of imperial authority. Wenceslaus had tried, unsuccessfully, to prevent its outbreak, and had shown that his sympathies were for the cities; but he had remained inert, thus leaving a bundle of forces useful to the crown against the princes to be weakened. On the other hand, they were dissatisfied with Wenceslas, who blamed him for neglecting Germany’s interests in his kingdom of Bohemia. The electors, gathered in Oberlahnstein, deposed the emperor (20 August 1400), who also accused of having mutilated the body of the Empire with the granting of the title of Duke of Milan to Gian Galeazzo Visconti (1395). The next day, in Rense, the Count Palatine of the Rhine, Robert of Wittelsbach, was elected in his place. The new ruler, with whom the Wittelsbachs made a last and not happy appearance among the protagonists of German history, remained for most as a usurper. The same principles that had brought him to the throne abandoned him without means, when it came to conquering the Milanese. The humiliating outcome of the expedition led by Robert III against the Visconti (1401) lowered even more the prestige of the monarchy, which would soon receive still more blows. In September 1405 the league of Marbach was formed between the archbishop of Mainz, some other princes and numerous Swabian cities; the following year the emperor was forced to recognize in the members of the Empire the right to gather in associations even without the consent of the sovereign, while he undertook, for his part, not to make alliances without understanding with the archbishop of Mainz. The degradation of the crown could not have emerged more clearly from this legal sanction of anarchy given by those who had the duty to prevent it. The death of Robert III (May 18, 1410) did not allow to see if he would have been able to profit from the dissolution of the league of Marbach (1409). Meanwhile, on the western border, Limburg, Luxembourg and Brabant also passed to a side branch of the French ruling family; and in the east the German influence received a decisive blow with the defeat of the Teutonic Knights at Tannenberg (1410).