At the end of the century the country fell under Spanish rule and can gradually lost its maritime trade: the Dutch had in 1606 founded the Company in the East Indies , which seized the Portuguese colonies in India and in 1624 began employment Brazil.
At that date back many pages of handwritten João Teixeira (c. 1602-1666), "Cosmographer the King," now important examples of Portuguese territorial claims against Spain, despite the agreements of the Treaty of Tordesillas, continued for over 150 years to come.
In 1668, regained their independence, Portugal re-established control in Mozambique, Angola, Macao and Brazil and finally abandoned by the Dutch in 1654, while the alliance with the British had obtained by marriage of Catherine of Braganza with Charles II.
Around the end of 1600 Portugal had achieved a strong economic power based on wealth from Brazil, where around 1750, was created the Society of Para.
In Lisbon, meanwhile, was founded in 1798, the Board hydro-cartographic state - among the oldest in the world - which changed names several times until the establishment of the Instituto Hidrográfica .