On 11 July 1346, in consequence of an alliance between his father and Pope Clement VI, relentless enemy of the emperor Louis IV, Charles was elected as Roman king in opposition to Louis by some of the prince-electors at Rhens. As he had previously promised to be subservient to Clement, he made extensive concessions to the pope in 1347. Confirming the papacy in the possession of vast territories, he promised to annul the acts of Louis against Clement, to take no part in Italian affairs, and to defend and protect the church.