The NIE Number is a tax identification number in Spain, known in Spanish as the "Número de Identificación de Extranjeros". The NIE Number is issued by the National Police of Spain and in accordance to Spanish law is required for the purchase or sale of any real estate, vehicle, or boat within Spain. There are many other transactions that require the parties involved to possess a NIE Number, for example the non-resident tax. The document is often used as a form of identification, and in many cases the original document is required (a copy is not sufficient). Once issued a NIE number, it will never change, irrelevant of marital status, name changes or residence status. The NIE Number is a national number and it can be used throughout the whole of Spain.
When applying for the first time the NIE number than the location of application IS relevant as you have to state the reason of application.
When applying for a duplicate than the location of application is irrelevant.