The Iberian Union was the dynastic union of the Crown of Portugal and the Spanish Crown between 1580 and 1640, bringing the entire Iberian Peninsula, as well as Spanish and Portuguese overseas possessions, under the Spanish Habsburg kings Philip II, Philip III and Philip IV of Spain. The union began as a result of the Portuguese crisis of succession and the ensuing War of the Portuguese Succession and lasted 60 years, until the Portuguese Restoration War in which the House of Braganza was established as Portugal's new ruling dynasty.
The Habsburg king was the only element of connection between the multiple kingdoms and territories. The governments, institutions, and legal traditions of each kingdom remained independent of each other.Alien laws (Leyes de extranjeria) determined that the national of one kingdom was a foreigner in all the other Iberian kingdoms.
The unification of the peninsula had long been a goal of the region's monarchs with the intent of restoring the Visigothic monarchy.Sancho III of Navarre and Alfonso VII of León and Castile had both taken the title Imperator totius Hispaniae, meaning "Emperor of All Hispania"