The formation of the Habsburg Monarchy began with the election of Rudolf I as King of Germany in 1273 and his acquisition of the Duchy of Austria for his house in 1282. In 1482, Maximilian I acquired the Netherlands through marriage. Both territories lay within the empire and passed to his grandson and successor, Charles V, who also inherited Spain and its colonies and ruled the Habsburg Empire at its greatest territorial extent. The abdication of Charles V in 1556 led to a broad division of the Habsburg holdings between his brother Ferdinand I, who was his deputy in the Austrian lands since 1521 and the elected king of Hungary and Bohemia since 1526, and his son Philip II of Spain. The Spanish branch (which held all of Iberia, the Netherlands, Burgundy, and lands in Italy) went extinct in 1700. The Austrian branch (which also had the imperial throne and ruled Hungary, Bohemia and all the crowns entailed to them) was itself divided between different branches of the family from 1564 to 1665 but thereafter it remained a single personal union.