The army of the Portuguese Empire is annihilated by the Kingdom of Kandy on Sri Lanka, bringing an end to the Campaign of Danture.

The Danture campaign comprised a series of encounters between the Portuguese and the Kingdom of Kandy in 1594, part of the SinhalesePortuguese War. It is considered a turning point in the indigenous resistance to Portuguese expansion. For the first time in Sri Lanka a Portuguese army was essentially annihilated, when they were on the verge of the total conquest of the island. A 20,000-strong Portuguese army, led by Governor Pedro Lopes de Sousa, invaded Kandy on 5 July 1594. After three months, severely depleted by guerilla warfare and mass desertions, what remained of the Portuguese army was annihilated at Danture by the Kandyans under King Vimaladharmasuriya. With this victory, the Kingdom of Kandy emerged as a major military power; it was to retain its independence, against Portuguese, Dutch, and British armies, until 1815.Victory at Danture notwithstanding, only the mobile section of the Portuguese army in Ceylon was annihilated, while their strongholds remained intact, and so Kandy was unable to follow up with an advance into the lowlands. The Portuguese would in the future renew their offensive against Kandy under the reorganized forces of captain-general Dom Jernimo de Azevedo, devastating Kandy in the process.

The Portuguese Empire (Portuguese: Império Português), also known as the Portuguese Overseas (Ultramar Português) or the Portuguese Colonial Empire (Império Colonial Português), was composed of the overseas colonies, factories, and the later overseas territories governed by Portugal. It was one of the longest-lived empires in European history, lasting almost six centuries from the conquest of Ceuta in North Africa, in 1415, to the transfer of sovereignty over Macau to China in 1999. The empire began in the 15th century, and from the early 16th century it stretched across the globe, with bases in North and South America, Africa, and various regions of Asia and Oceania.The Portuguese Empire originated at the beginning of the Age of Discovery, and the power and influence of the Kingdom of Portugal would eventually expand across the globe. In the wake of the Reconquista, Portuguese sailors began exploring the coast of Africa and the Atlantic archipelagos in 1418–19, using recent developments in navigation, cartography, and maritime technology such as the caravel, with the aim of finding 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, either by an accidental landfall or by the crown's secret design, Pedro Álvares Cabral reached what would be Brazil.

Over the following decades, Portuguese sailors continued to explore the coasts and islands of East Asia, establishing forts and trading posts (factories) as they went. By 1571 a string of naval outposts connected Lisbon to Nagasaki along the coasts of Africa, the Middle East, India, and South Asia. This commercial network and the colonial trade had a substantial positive impact on Portuguese economic growth (1500–1800) when it accounted for about a fifth of Portugal's per-capita income.

When King Philip II of Spain (Philip I of Portugal) seized the Portuguese crown in 1580 there began a 60-year union between Spain and Portugal known to subsequent historiography as the Iberian Union. The realms continued to have separate administrations. As the King of Spain was also King of Portugal, Portuguese colonies became the subject of attacks by three rival European powers hostile to Spain: the Dutch Republic, England, and France. With its smaller population, Portugal found itself unable to effectively defend its overstretched network of trading posts, and the empire began a long and gradual decline. Eventually, Brazil became the most valuable colony of the second era of empire (1663–1825), until, as part of the wave of independence movements that swept the Americas during the early 19th century, it broke away in 1822.

The third era of empire covers the final stage of Portuguese colonialism after the independence of Brazil in the 1820s. By then, the colonial possessions had been reduced to forts and plantations along the African coastline (expanded inland during the Scramble for Africa in the late 19th century), Portuguese Timor, and enclaves in India (Portuguese India) and China (Portuguese Macau). The 1890 British Ultimatum led to the contraction of Portuguese ambitions in Africa.

Under António Salazar (in office 1932–1968), the Estado Novo dictatorship made some ill-fated attempts to cling on to its last remaining colonies. Under the ideology of pluricontinentalism, the regime renamed its colonies "overseas provinces" while retaining the system of forced labour, from which only a small indigenous élite was normally exempt. In 1961 India annexed Goa and Damaon and Dahomey annexed Fort of São João Baptista de Ajudá. The Portuguese Colonial War in Africa lasted from 1961 until the final overthrow of the Estado Novo regime in 1974. The Carnation Revolution of April 1974 in Lisbon led to the hasty decolonization of Portuguese Africa and to the 1975 annexation of Portuguese Timor by Indonesia. Decolonization prompted the exodus of nearly all the Portuguese colonial settlers and of many mixed-race people from the colonies. Portugal returned Macau to China in 1999. The only overseas possessions to remain under Portuguese rule, the Azores and Madeira, both had overwhelmingly Portuguese populations, and Lisbon subsequently changed their constitutional status from "overseas provinces" to "autonomous regions".