<P> Henry also lacked heirs, and his death triggered a succession crisis, where the main claimants to the throne were Philip II of Spain and Anthony, Prior of Crato . Philip was crowned king in 1581, beginning a personal union between the two nations known as the Iberian Union . After a three - year - long war with Anthony and his foreign allies, resistance crumbled and the union was consolidated . </P> <P> The Iberian Union lasted for almost sixty years until 1640, when the Portuguese Restoration War was initiated against Castile, and Portugal reestablished the Portuguese dynasty under the Bragança . </P> <P> During the wars of the 18th century, which were often fought by the major powers to maintain the European balance of power, Spain and Portugal usually found themselves on opposite sides . The Portuguese, courtesy of their long - standing alliance, aligned themselves with Great Britain, while Spain, through the Bourbon Family Compact, allied themselves to France . In 1762, during the Seven Years' War, Castile launched an unsuccessful invasion of Portugal . </P> <P> In 1777, there was a conflict between the two states over the borders of their possessions in South America . </P>

How did portugal and spain acquire their empires in the americas