In the case of acquiring property in Spain, it is necessary to have a NIE, which is the identification number for foreign nationals in Spain.