In the mid-1300s the Black Death struck Portugal and war with Castille (in Spain) broke out, but quickly ended with Portuguese victory. This was followed by a relatively peaceful and prosperous time for Portugal. The 1400s gave rise to Portugal's power on the seas as they established trade along Africa's coasts and later that century, in 1498, Vasco da Gama reached India as Portugal took control over the Indian-European spice trade.
Portugal spent much of the 1500s colonizing, most notably Brazil, Goa, and what is today Timor-Leste (East Timor); they were also the first Europeans to land in Australia and New Zealand. However, Portugal's independence weakened in 1580 when their king died without an heir and the Spanish ruler, Philip II took control of the country. Although they nominally maintained their independence, this led to Portuguese involvement in Spanish wars and eventually led to the loss of Portugal's monopoly on Indian Ocean trading routes. In the mid-1600s Portugal tired of Spanish rule so an uprising put a Portuguese king back on the thrown.
In the late 1700s a number of social and political reforms were undertaken and in the early 1800s the Spanish allowed Napoleon's French troops into their country to invade Portugal. With the support of the British, the Portuguese held off the French and maintained independence. This, however was only the beginning of many of Portugal's problems as, soon after, Brazil gained independence and Portugal's power went into a continuous decline.
Economic disasters in the early 1900s led to the assassination of the king and his son, which was followed by revolution, a second new government, a coup, and the beginning of a dictatorship in 1926. Shortly after the new government took power, World War II (WWII) broke out, but Portugal managed to maintain neutrality.