Aragon was formed as a Frankish county and was elevated to a kingdom in the 11th century. It expanded its territory southwards during the reconquista and subsequently managed to control a large part of the Mediterranean. In 1469 king Fernando II married Isabella of Castile, a union that would form the base of the Spanish unification. The kingdom was legally dissolved in 1707 but today Aragon continues to exist as an autonomous community of Spain.