Buying a home in Madrid, step by step
How a purchase works in Spain, in the order it happens. It's the same whether you live here or abroad; non-residents just need a few more papers first.
Get an NIE
The NIE is the identity number Spain gives foreigners. You need it to sign the deed, pay the taxes and open most bank accounts. You can apply at a Spanish consulate abroad or at a police station in Spain, and appointments can take weeks, so start early.
Open a Spanish bank account
Not strictly required, but the taxes, utilities, community fees and the IBI property tax are much easier to pay from one. If you'll need a mortgage, talk to banks now: non-residents usually get a lower loan-to-value.
Find the home and check it
Ask for the nota simple from the Land Registry (Registro de la Propiedad). It shows who owns the home and whether it carries a mortgage, a seizure or other charges. Ask the community of owners for a certificate that the fees are paid, and check the energy certificate and the building's inspection (ITE/IEE) if it's an older block.
Sign the arras contract
Once you agree a price, buyer and seller usually sign a private deposit contract, the contrato de arras, and the buyer pays a deposit, often around 10%. With the common penitential arras (Código Civil, art. 1454), a buyer who walks away loses the deposit and a seller who walks away pays it back doubled. Have a lawyer read it before you sign.
Sort out the mortgage
The bank values the home and gives you a binding offer, the FEIN. The law gives you at least ten days to study it, and a free session with a notary to explain it, before you sign.
Sign the deed at the notary
Buyer and seller sign the escritura in front of a notary, you pay the rest of the price, usually by banker's draft or transfer, and you get the keys. If the seller lives abroad, you hold back 3% of the price for the tax office.
Pay the taxes and register
Pay ITP (resale) or AJD (new build) to the Comunidad de Madrid within 30 working days, then register the deed at the Land Registry so your ownership is protected against third parties. Most buyers have a gestoría or their lawyer do both.
After you move in
Change the utilities to your name, set up direct debits for the community fees and the IBI property tax, and keep the deed and tax receipts: you'll need them when you sell.
General information, not legal advice. Laws and practice change; check with a lawyer or notary for your case.

The golden visa is gone
Spain ended residence by investment on 3 April 2025 (Ley Orgánica 1/2025). Buying a home of €500,000 or more no longer gives you a residence permit. If you want to live in Madrid, look at the other routes, such as the non-lucrative visa, the digital nomad visa or a work permit, before you buy.
More questions
Do I need a lawyer to buy a home in Spain?
It isn't required, because the notary checks the deed, but the notary doesn't check everything a buyer cares about, such as planning issues, unpaid community fees or a bad arras contract. Many buyers, and nearly all foreign buyers, use an independent lawyer.
How long does buying a home in Madrid take?
Often one to three months from the arras contract to the deed, depending mainly on the mortgage. Getting an NIE first can add weeks.
What is a nota simple?
A short extract from the Land Registry showing the owner, the description of the property and any charges on it, such as a mortgage. Anyone can request it online for a small fee.
What yearly costs does a Madrid home have?
The IBI property tax from the city council, the community of owners' fees, home insurance and, if you're not resident in Spain, non-resident income tax on the property even when you don't rent it out.