spanish investments in portugal dollars 2m , scarcely totalled dollars 21m in 1985 , the year before both countries became members of the eu , and they totalled dollars 812m last year , a year when spain displaced the uk as the biggest direct investor in portugal and when 25 per cent of all spain 's foreign investment was directed towards portugal .