The Portuguese Empire was the earliest and longest lived of the modern European colonial empires, spanning almost six centuries, from the capture of Ceuta in 1415 to the handover of Macau in 1999. Portuguese explorers began exploring the coast of Africa in 1419, leveraging the latest developments in navigation, cartography and maritime technology such as the caravel, in order that they might find a sea route to the source of the lucrative spice trade. In 1488, Bartolomeu Dias rounded the Cape of Good Hope, and in 1498, Vasco da Gama reached India. In 1500, by an accidental landfall on the South American coast for some, by the crown's secret design for others, Pedro Álvares Cabral would find and lead to the establishment of the colony of Brazil.
Over the following decades, Portuguese sailors continued to explore the coasts and islands of East Asia, establishing forts and trading posts as they went. By 1571, a string of outposts connected Lisbon to Nagasaki: the empire had become truly global, and in the process brought great wealth to Portugal. Between 1580 and 1640 Portugal became the junior partner to Spain in the Iberian Union of the two countries' crowns. Though the empires continued to be administered separately, Portuguese colonies became the subject of attacks by three rival European powers hostile to Spain and envious of Iberian successes overseas: The Netherlands (which was engaged in a war of independence against Spain), England and France.