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