Having made good use of the difficulties of his opponents, Charles was again elected in Frankfurt on 17 June 1349 and re-crowned at Aachen on 25 July 1349. He was soon the undisputed ruler of the Empire. Gifts or promises had won the support of the Rhenish and Swabian towns; a marriage alliance secured the friendship of the Habsburgs; and an alliance with Rudolf II of Bavaria, Count Palatine of the Rhine, was obtained when Charles, who had become a widower in 1348, married Rudolph's daughter Anna. The empire he ruled from Prague expanded and his subjects lived in peace and prosperity.