9. From 1580 to 1640, Portugal was under Spanish rule. However, due to the general insatisfaction, there was a war to restore the Portuguese independence. This was called the Restoration War and finally Portugal became an independent nation again. When?