It’s possible for foreigners to get mortgages in Portugal, and the terms for non-residents are more generous than in most other EU countries.
Currently, variable rates begin at 1% annually, based on a 30% LTV, but it’s possible to get loans of up to 80% LTV here… though rare.