After Louis of the House of Wittelsbach, later crowned Louis IV, Holy Roman Emperor, had decided the war against the House of Habsburg in his favour in September 1322, he gave the Margraviate of Brandenburg to his seven-year-old son, Louis V "the Brandenburger" in 1323. The formal investiture was issued in 1324, and included the Duchy of Pomerania as a Brandenburgian fief. Rudolf I in late 1324 withdrew from Brandenburgian areas in turn for a compensation, The House of Wittelsbach subsequently gained control over the margraviate until they were in full charge in 1343. During this process, the Pomeranians had to withdraw from the Uckermark after a series of battles throughout the late 1320s and early 1330s. In 1330, they took their duchy as a papal fief to circumvent Brandenburg's claims. In 1338, they concluded a peace with Brandenburg, who renounced her claims on overlordship but maintained the right of succession.