Meanwhile a reaction against German influence had taken place in Hungary. King Peter had been driven out in 1046 and his place taken by Andreas I. Inroads into Bavaria followed, and in 1051 and 1052 Henry led his forces against the Hungarians, and after the pope had vainly attempted to mediate, peace was made in 1053. It was quickly broken, however, and the emperor, occupied elsewhere, soon lost most of his authority in the east; although in 1054 he made peace between Brestislav of Bohemia and Casimir I., duke of the Poles. Henry had not lost sight of affairs in Italy during these years, and had received several visits from the pope, whose aim was to bring southern Italy under his own dominion. Henry had sent military assistance to Leo, and had handed over to him the government of the principality of Benevento in return for the bishopric of Bamberg. But the pope's defeat by the Normans was followed by his death. Henry then nominated Gebhard, bishop of Eichstädt, who took the name of Victor II., to the vacant chair, and promised his assistance to the reluctant candidate. In 1055 the emperor went a second time to Italy, where his authority was threatened by Godfrey of Lorraine, who had married Beatrice, widow of Boniface III., margrave of Tuscany, and was ruling her vast estates. Godfrey fled, however, on the appearance of Henry, who only remained a short time in Italy, during which he granted the duchy of Spoleto to Pope Victor, and negotiated for an attack upon the Normans. Before the journey to Italy, Henry had found it necessary to depose Conrad III., duke of Bavaria, and to suppress a rising in southern Germany. During his absence Conrad formed an alliance with Welf, duke of Carinthia, and Gebhard III., bishop of Regensburg. A conspiracy to depose the emperor, support for which was found in Lorraine, was quickly discovered, and Henry, leaving Victor as his representative in Italy, returned in 1055 to Germany to receive the submission of his foes. In 1056, the emperor was visited by the pope; and on the 5th of October in the same year he died at Bodfeld and was buried at Spires. Henry was a pious and peace-loving prince, who favoured church reform, sought earnestly to suppress private warfare, and alone among the early emperors is said to have been innocent of simony. Although under his rule Germany enjoyed considerable tranquillity, and a period of wealth and progress set in for the towns, yet his secular and ecclesiastical policy showed signs of weakness. Unable, or unwilling, seriously to curb the increasing power of the church, he alienated the sympathies of the nobles as a class, and by allowing the southern duchies to pass into other hands restored a power which true to its traditions was not always friendly to the royal house. Henry was a patron of learning, a founder of schools, and built or completed cathedrals at Spires, Worms and Mainz.