we are selling our house here in the UK - our primary residence which we bought in 2003

The gain from the original price and the expected selling price will be 150K.

We intend buying in Spain at approx 100K and investing the rest in a savings account

Do we have to pay capital gains in Spain once we have gained residency.

This is going to hit our savings hard if it is the case.