The Arras agreement required all Spanish troops to leave these lands. Meanwhile, Philip had his eye on uniting the entire Iberian Peninsula under his rule, a traditional objective of Spanish monarchs. The opportunity came in 1578 when the Portuguese king Sebastian launched a crusade against Morocco. The expedition ended in disaster and Sebastian's disappearance at the Battle of the Three Kings. His aged uncle Henry ruled until he died in 1580. Although Philip had long prepared for the takeover of Portugal, he still found it necessary to launch a military occupation led by the Duke of Alva. Philip took the title of King of Portugal, but otherwise the country remained autonomous, retaining its own laws, currency, and institutions. However, Portugal surrendered all independence in foreign policy, and relations between the two countries were never warm.