The ID card is issued at offices of the National Police. To apply for a DNI, it is necessary to have Spanish nationality and permission from the Spanish consulate. Foreigners legally resident in Spain or who intend to purchase property are issued with a Número de identificación de extranjero (NIE) or Foreign Identification Number.