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
Border guard Defence Forces when required by defence readiness. The Border Guard has police and investigative powers in immigration matters and can independently investigate immigration violations. The Border Guard has search and rescue (SAR) duties, both maritime and inland. The Guard operates SAR helicopters that are often used in inland SAR, in assistance of a local fire and rescue department or other authorities. The Border Guard shares border control duties with Finnish Customs, which inspects arriving goods, and the Finnish Police, which enforces immigration decisions such as removal. The French "Direction générale des douanes et droits indirects", Directorate-General of Customs and Indirect