History of Portugal (1640–1777) put to the test in 1762 when Spain invaded aided by France, during the Seven Years' War. Britain invoked its alliance with Portugal and sent troops. Several months later, the conflict was settled with comparatively little fighting. In 1777, Spain and Portugal signed the Treaty of San Ildefonso, which mainly resolved a number of border disputes between their South American colonies. During the Age of Enlightenment, Portugal was considered one of Europe's unenlightened backwaters; it was a country of three million with 200,000 people in 538 monasteries in 1750. Melo seems to have been deeply embarrassed by Portugal's much lamented
TAP Air Portugal would lead to Swissair buying a 34% stake of TAP. Also, TAP became a member of Qualiflyer, the frequent-flyer program led by the Swiss flag carrier. Due to financial difficulties, the Swiss company ends up not buying the agreed shares of TAP Air Portugal, unilaterally revoking the partnership agreement which led to unexpected costs for the Portuguese airline in 2000, with the culmination of a legal action taken against Swissair. TAP became a member of Star Alliance on 14 March 2005, the same day on which the company celebrated its 60th anniversary. TAP Air Portugal was re-branded as TAP Portugal