The main fortifications of Tui and Valença date to the 17th century , when Spain and Portugal were at war .
The main fortifications of Tui and Valenca date to the 17th century , when Spain and Portugal were at war .