LOUIS IV., or V. (c. 1287-1347), surnamed the Bavarian, Roman emperor and duke of Upper Bavaria, was the second son of Louis II., duke of Upper Bavaria and count palatine of the Rhine, and Matilda, daughter of the German king Rudolph I. At his father's death in 1294 he inherited, jointly with his elder brother Rudolph, Upper Bavaria and the Palatinate, but passed his time mainly at the court of the Habsburgs in Vienna. In the quarrel with his brother over their joint possessions, Louis was supported by his uncle Albert I., the German king. Rudolph promised in 1301 to admit his brother to a share in the govern ment of Bavaria and the Palatinate. When Albert was murdered in May 1308, Louis became a candidate for the German throne; but his claim was not strongly supported. The new king, Henry VII., was very friendly with Rudolph, and as the promise of 1301 had not been carried out, Louis demanded a partition of their lands, and received the north-western part of Upper Ba varia in 1310, but Rudolph refused to surrender any part of the Palatinate. In 1310, on the death of Stephen I., duke of Lower Bavaria, Louis undertook the guardianship of his two young sons. This led to a war between the brothers, which lasted till June 1313, when peace was made at Munich. Frederick I. (the Fair), duke of Austria, called in by the nobles of Lower Bavaria, was de feated at Gammelsdorf on Nov. 9, 1313.
In Aug. 1313 the German throne had again become vacant, and Louis was chosen at Frankfort on Oct. 20, 1314, and crowned at Aix-la-Chapelle on Nov. 25. War followed between Louis and the rival candidate, Frederick of Austria. Louis's embarrassments were complicated by a new dispute with his brother; but in 1317 Rudolph renounced his claims on Upper Bavaria and the Palat inate in consideration of a yearly subsidy and Louis was able to give undivided attention to the war with Frederick. On Sept. 28, 1322, a battle was fought at Maldorf, which ended in a com plete victory for Louis, owing mainly to the timely aid of Fred erick IV. of Hohenzollern, burgrave of Niiremburg. Frederick of Austria was taken prisoner, but the struggle was continued by his brother Leopold until the latter's death in 1326. Attempts to enable the two kings to rule Germany jointly failed, and about 1326 Frederick returned to Austria. Supported by Philip V. of France in his desire to free Italy entirely from German influence, Pope John XXII. refused to recognize either Frederick or Louis, and asserted his own right to administer the empire during a vacancy.
After the battle of Miihldorf Louis sent Berthold of Neifen, count of Marstetten, into Italy with an army, which soon com pelled the papal troops to raise the siege at Milan. The pope threatened Louis with excommunication unless he resigned his kingdom within three months. The king thereupon appealed to a general council, and was placed under the papal ban on March 23, 1324, a sentence which he answered 1. y publishing his charges against the pope. In the contest Louis was helped by the Minor ites, who were upholding against John the principle of clerical poverty, and by the writings of Marsilius of Padua (who dedi cated to Louis his Defensor pads), William of Occam, John of Jandun and others. Taking the offensive, Louis met his Ghibelline supporters at Trent and reached Italy in March 1327; and in May he received the Lombard crown at Milan.
Louis compelled Pisa to surrender and on Jan. 17, 1328, he was crowned emperor in St. Peter's by Sciarra Colonna, a Roman noble; he answered the continued attacks of Pope John by pro nouncing his deposition, and proclaiming Peter of Corvara pope as Nicholas V. He then undertook an expedition against John's ally, Robert, king of Naples, but, disunion among his troops and scarcity of money and provisions drove him again to Rome, where, finding that his exactions had diminished his popularity, he left the city, and after passing six months at Pisa, returned to Germany in Jan. 1330. The struggle with the pope was re newed in Germany, and a formidable league had been formed against Louis. He was prepared to assent to very humiliating terms, and agreed to abdicate; but negotiations were interrupted by the pope's death in Dec. John's successor, Benedict XII., was prevented from coming to terms by the influence of Philip VI. of France. Overtures for peace were made to Philip, but without success; and in July 1337 Louis concluded an alli ance with Edward III., king of England, and made active prep arations for war. During these years his attention was also occupied by a quarrel with John, king of Bohemia, over the pos session of Tirol, by a campaign in Lower Bavaria, and a futile expedition against Nicholas I., bishop of Constance. His position was improved when the electors meeting at Rense in July 1338 banded themselves together to defend their elective rights, and when the diet at Frankfort confirmed a decree which declared that the German king did not need the papal approbation to make his election valid.