 Nonetheless, the same agreements promised Ferdinand the designation as future emperor and the transfer of hereditary rights over Austria at the imperial succession.Following the death of Louis II, King of Hungary and Bohemia, at the Battle of Mohacs in 1526, Charles V favored the election of Ferdinand as king of Hungary (and Croatia and Dalmatia) and Bohemia.Despite this, Charles also styled himself as king of Hungary and Bohemia and retained this titular use in official acts (such as his testament) as in the case of the Austrian lands.