Iberian Union is the anachronistic historical designation of the political union of the Crown of Portugal with the other Iberian crowns - through a dynastic union, under the Spanish branch of the Habsburg monarchy, after the War of the Portuguese Succession - that included all the Iberian Peninsula, the Spanish Empire and the Portuguese Empire, from 1580 to 1640. Following the Portuguese crisis of succession, a dynastic union joined the crowns of Castile, Portugal and Aragon along with their respective colonial possessions, under the rule of the Hispanic monarchy. 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. The alien laws (Leyes de extranjeria) determined that the national of one kingdom was a foreigner in all the other Iberian kingdoms. The term Iberian union is a creation of modern historians.
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 both took the title Imperator totius Hispaniae, meaning "Emperor of All Hispania" centuries before. The union could have been achieved earlier had Miguel da Paz (1498–1500), Prince of Portugal and Asturias, become king. He died early in his childhood.
The history of Portugal from the dynastic crisis in 1578 to the first Braganza Dynasty monarchs was a period of transition. The Portuguese Empire's spice trade was peaking at the start of this period. It continued to enjoy widespread influence after Vasco da Gama had finally reached the East by sailing around Africa in 1497–98. Vasco da Gama's achievement completed the exploratory efforts inaugurated by Henry the Navigator, and opened an oceanic route for the profitable spice trade into Europe that bypassed the Middle East.
Throughout the 17th century, the increasing predations and surrounding of Portuguese trading posts in the East by the Dutch, English and French, and their rapidly growing intrusion into the Atlantic slave trade, undermined Portugal's near monopoly on the lucrative oceanic spice and slave trades. This sent the Portuguese spice trade into a long decline. To a lesser extent the diversion of wealth from Portugal by the Habsburg monarchy to help support the Catholic side of the Thirty Years' War also created strains within the union, although Portugal did also benefit from Spanish military power in helping to retain Brazil and in disrupting Dutch trade. These events, and those that occurred at the end of Aviz dynasty and the period of Iberian Union, led Portugal to a state of dependency on its colonies, first India and then Brazil.