The Iberian Union or the Hispanic Monarchy, describes the period from 1580 to 1640 in which the Monarchy of Spain under the Habsburg dynasty, then the personal union of the crowns of Castile and Aragon, brought in personal union also the Kingdom of Portugal. It incorporated the entire Iberian Peninsula except Andorra, as well as Portuguese and Spanish overseas possessions, under the Spanish Habsburg monarchs Philip II, Philip III, and Philip IV. The union began after the Portuguese succession crisis of 1580 and the ensuing War of the Portuguese Succession, and lasted until the Portuguese Restoration War, during which the House of Braganza was established as Portugal's new ruling dynasty with the acclamation of John IV as the new king of Portugal.
As a personal union, the Kingdom of Portugal, the Crown of Castile and the states of the Crown of Aragon remained independent states, sharing only a single monarch. The kings from the Spanish branch of the House of Habsburg were the only element that connected the multiple kingdoms and territories, ruled by the six separate government councils of Castile, Aragon, Portugal, Italy, Flanders-Burgundy, and the Indies. For periods, Portugal maintained a viceroy, appointed by the king, although the turnover was often rapid; in the 60 years of the Union, the country had 13 viceroys and four regency councils (see List of viceroys of Portugal). Similar viceroys were appointed in Aragon, Catalonia, Valencia and other kingdoms of the Union. The governments, institutions, and legal traditions of each kingdom remained independent of one another. Alien laws (Leyes de extranjerĂa) determined that a national of one kingdom was a foreigner in all other kingdoms.