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
Roads in Portugal the motorways in Portugal). Since the payment is electronic, it is quick to enter or leave the motorway, avoiding payment lines (which are still available for drivers without Via Verde). This system has won several prizes for its innovative form of paying for services. There are 9 "itinerários principais" (principal routes), signalized by the prefix IP, designated IP1 through IP9. IP1 and IP2 form cross-national north–south routes. The first runs along the west part of the country then ends in the southeast border of Castro Marim/Vila Real de Santo António; the second runs along the east part, roughly along the