Frederick recognized Louis as legitimate ruler and undertook to return to captivity should he not succeed in convincing his brothers to submit to Louis. As he did not manage to overcome Leopold's obstinacy, Frederick returned to Munich as a prisoner, even though the Pope had released him from his oath. Louis, who was impressed by such nobility, renewed the old friendship with Frederick, and they agreed to rule the Empire jointly. Since the Pope and the electors strongly objected to this agreement, another treaty was signed at Ulm on 7 January 1326, according to which Frederick would administer Germany as King of the Romans, while Louis would be crowned as Holy Roman Emperor in Italy. However, after Leopold's death in 1326, Frederick withdrew from the regency of the Empire and returned to rule only Austria. He died on 13 January 1330. Coronation as Holy Roman Emperor and conflict with the Pope After the reconciliation with the Habsburgs in 1326, Louis marched to Italy and was crowned King of Italy in Milan in 1327. Already in 1323, Louis had sent an army to Italy to protect Milan against the Kingdom of Naples, which was together with France the strongest ally of the papacy. But now the Lord of Milan Galeazzo I Visconti was deposed since he was suspected of conspiring with the pope. In January 1328, Louis entered Rome and had himself crowned emperor by the aged senator Sciarra Colonna, called captain of the Roman people. Three months later, Louis published a decree declaring Pope John XXII (Jacques Duèze), who resided in Avignon, deposed on grounds of heresy. He then installed a Spiritual Franciscan, Pietro Rainalducci as antipope Nicholas V, who soon left Rome and a few years later submitted to Pope John XXII. In the meantime, Robert, King of Naples had sent both a fleet and an army against Louis and his ally Frederick II of Sicily. Louis spent the winter 1328/29 in Pisa and stayed then in Northern Italy. When his co-ruler Frederick of Habsburg died in 1330, Louis returned from Italy. In fulfillment of an oath, Louis founded Ettal Abbey on 28 April 1330. Franciscan theologians Michael of Cesena and William of Ockham, and the philosopher Marsilius of Padua, who were all on bad terms with the Pope as well, joined Emperor Louis in Italy and accompanied him to his court at Alter Hof in Munich which became