Home > Guides > Questions > Unlicensed works and first occupation
A Spanish residential building being checked for planning and occupancy documents
Questions · Property · Non-lucrative visa

Unlicensed works in Spain: the property problem foreign buyers miss

A deed, keys and a Catastro map can all look reassuring while the legal planning file says something else. Before a property becomes your home, your rental plan or your proof of accommodation, check whether the building, extension, pool or change of use was actually authorised.

Foreign buyers often treat Spanish property legality as a title question. They ask whether the seller owns the property, whether the mortgage will be cancelled, whether the community fees are paid and whether the notary will sign. Those questions matter. They do not answer the planning question.

The planning question is narrower and more dangerous: does the physical thing you are buying match what the town hall authorised, what the technician certified, what the Land Registry records, what Catastro taxes and what the law permits that property to be used for? If the answer is no, the problem may be a missing paper, a fixable legalisation, a price adjustment, a mortgage problem, a resale problem, or a red line that should stop the purchase.

This page is written for foreign buyers and owners, especially people using a property as part of a non-lucrative visa plan. It does not repeat the whole Spanish property purchase process. It focuses on the specific gap between "I own it" and "it is lawful, habitable and usable for the purpose I need."

Lola Jurado, immigration lawyer

“A client does not need a perfect property. They need to know which imperfection they are buying. The dangerous file is the one where the pool, guest room or rural house is treated as normal because everyone can see it, but nobody has checked whether the town hall ever accepted it.”

— Lola Jurado · Registered lawyer, Ilustre Colegio de Abogados de Málaga · colegiada nº 10907

The short answer

In Spain, the legal title to a property and the urban-planning legality of the building are related but not identical. The Land Registry can show that the seller owns the house. Catastro can show the surface area used for tax. The notary can execute the deed. None of those facts, alone, proves that every extension, pool, garage conversion, terrace enclosure or change of use was authorised by the town hall.

The usual sequence for lawful building work is: a planning title before the works, usually a licencia de obras or, for some lighter works, a declaration or communication where local rules allow it; technical direction and final certification where required; and then, for a new building or relevant first use, a first-occupation licence, first-occupation declaration or equivalent document proving that the building can be used for its intended residential purpose.

When that sequence is broken, the answer is not always "do not buy." It may be "legalise before completion," "retain part of the price," "exclude the square metres from valuation," "treat it as a future demolition risk," "accept AFO status with eyes open," or "walk away." The key is to decide before the arras contract makes leaving expensive.

The one-sentence version: the registry tells you who owns the property; the town hall file tells you whether the physical property you saw can lawfully exist and be used as a dwelling.

The four files that must line up

A careful review compares at least four different records. Each one answers a different question.

The Land Registry answers the ownership and charges question: who owns it, what is registered, what mortgages, easements, embargoes or limitations appear, and how the building is described in the public register. It is essential, but it is not a full urban-planning audit.

Catastro answers a tax and mapping question. It may show a larger surface area than the registry, or show a pool that the registry does not. That discrepancy is useful because it points to something to investigate. It does not prove that the town hall approved the works.

The municipal planning file is where the real building-permit question sits: the licence or declaration for the works, the approved project where one exists, conditions, inspections, disciplinary files, occupation licence or declaration, and any orders affecting the property.

The physical property is the final check. The lawyer and technician should compare what is recorded with what exists: extra bedrooms, enclosed terraces, a basement used as living space, a pool, a separate guest unit, a pergola turned into a room, a garage changed to a studio, or a rural outbuilding presented as accommodation.

Most problems are found in the gaps between those files. The registry says 110 square metres, Catastro says 168, the agent says "the owners closed the terrace years ago," and the town hall file contains no licence for that extra room. That does not tell you the answer, but it tells you the question.

First-occupation licence: what it proves

The licencia de primera ocupación, or the equivalent first-occupation declaration where regional law has moved the process into a responsible-declaration model, is the document that connects the completed building to lawful residential use. In simple terms, it shows that the finished building matches the authorised project and can be put to the intended use.

For a new build, a major rehabilitation or a change that creates a new dwelling, this document can be central to completion, utility connection, financing and resale. Article 28 of the consolidated Land and Urban Rehabilitation Act links declarations of new work to the administrative act required by planning law, technical certification that the work matches the authorised project, and the authorisations needed to guarantee that the building meets the conditions for its intended use. The Directorate-General for Legal Certainty and Public Faith has repeatedly treated the first-occupation licence, or its equivalent, as the usual expression of that final-use control, subject to regional declaration systems.

Do not reduce this to one acronym. Depending on the autonomous community and the date, the document may be called a first-occupation licence, first-use licence, licencia de ocupación, licencia de utilización, cédula de habitabilidad, responsible declaration of first occupation, or another equivalent title. The name matters less than the function: has the competent administration accepted that this building can be occupied for residential use?

This is why the topic also appears in our page on tourist rental licences and the non-lucrative visa. A tourist-use declaration often depends on the dwelling having the underlying residential-use and habitability documents first. If the base home has not cleared that gate, a rental licence is built on sand.

Why the registry is not enough

Buyers tend to overtrust the nota simple because it is official, crisp and familiar. It is official. It is not complete for this purpose.

Article 28 is strong for new work declarations, especially when a new building or completed works are being declared for registration. Notaries and registrars require the planning title, technical certification and, for completed work, the documents showing that the building meets the conditions for the intended use, plus other building-law requirements where applicable. That is a safeguard.

But it does not eliminate every later or older problem. A flat may have a legally registered original building and an unlicensed enclosed terrace. A villa may be registered as a dwelling while the separate guest house is not. A pool may appear nowhere. A commercial premises may have been converted into a residential unit without the required change-of-use file. A rural building may have been regularised only in a limited way. The registry may tell you what has been declared; it does not guarantee that everything you saw at the viewing is lawful.

The practical consequence is valuation. If the mortgage valuation includes square metres that cannot be legalised, the bank may reduce lending. If resale buyers later discover the issue, they may renegotiate or walk. If the town hall has an active disciplinary file, the buyer may inherit a conflict rather than a home.

Why Catastro is not legalisation

Catastro causes the opposite mistake. Because the map is official and often shows the actual physical building, owners assume it has legalised the building. It has not. Catastro is a cadastral and tax record, used for IBI and other fiscal and administrative purposes. It is very useful evidence of surface area, age, use and discrepancies, but it is not a planning licence.

That difference matters most with old extensions and pools. A pool may appear in Catastro because it was detected from aerial imagery or declared for tax regularisation. The owner may have paid higher IBI for years. That does not answer whether the pool had a municipal licence, whether it respects setbacks, whether it sits on protected land, or whether it can be included in a lawful first-occupation or resale file.

Use Catastro as a warning system. If Catastro and the registry disagree, ask why. If both disagree with the actual property, ask twice. If the seller says "it is in Catastro, so it is legal," ask for the building licence or the municipal legalisation document.

Old works and the prescription trap

Spain has limitation periods for many urban-planning restoration powers, but this is where foreign buyers get a dangerously simple story. The story is: "It was built years ago, so it has prescribed." The better version is: "Time may affect what the administration can now order, depending on the region, the land classification, the type of infringement and whether protected interests are involved."

Some irregular works may be compatible with planning and legalisable by filing the correct project, paying fees and taxes, and obtaining the licence that should have been obtained before. Others are incompatible but old enough that the administration may no longer be able to order restoration under the ordinary period. Others are on protected rural land, public domain, coastal protection zones, roads, easements or other categories where ordinary prescription analysis may not rescue the building.

Even where restoration action is time-barred, that is not the same as full legality. The property may remain outside planning, limited in the works it can obtain later, difficult to mortgage, difficult to insure, difficult to rent legally, or less valuable on resale. The question is not just "can they demolish it tomorrow?" It is "what status am I buying for the next ten years?"

AFO in Andalucia

On the Costa del Sol and inland Andalucia, foreign buyers often meet the term AFO: asimilado a fuera de ordenación. The Junta de Andalucia describes AFO as the situation of a finished building constructed without the required planning licences, or contrary to them, where it is no longer possible to adopt measures for protection of urban legality or restoration of the disturbed legal order.

AFO is useful because it gives an irregular building a recognised administrative status and can support access to basic services under the conditions set by the resolution. It is not the same thing as a normal licence of first occupation. The Andalusian rules expressly distinguish AFO from ordinary occupation or use licences. In plain English: AFO may make a building tolerable and usable under conditions; it does not rewrite history as if the building had been licensed from the start.

That distinction should be priced. AFO may be acceptable for a buyer who understands the limitations, especially with an existing rural home that will be used as it stands. It is more problematic for a buyer who wants to extend, mortgage aggressively, create tourist accommodation, split the property, use it as pristine residence evidence, or resell quickly to a cautious buyer.

Why this matters to a residence file

Immigration authorities are not town-planning departments. They do not normally audit your building licence line by line. But if you are using the property to support proof of accommodation, the property must be credible as a place you can actually live.

A clean title deed to a lawful, habitable dwelling is useful. A deed to a property missing the document that confirms residential occupation, or where the utility connection depends on an AFO resolution with conditions, may require more explanation. A rural building in an unresolved planning file is not the same accommodation evidence as a normal apartment with utility bills and a first-occupation trail. If timing matters, a clean long-term lease may be safer while the property issue is being resolved.

The issue also affects budget. Legalisation costs, architect reports, municipal taxes, penalties, retained price, utility works and possible demolition of an illegal element do not help meet the income requirement for the non-lucrative visa. They simply reduce the cash cushion. That is why this page belongs next to buying property and the non-lucrative visa, not only next to real-estate due diligence.

What to ask before signing arras

The moment to protect yourself is before the deposit contract. Once the arras is signed, the dispute becomes more expensive because the seller and buyer have already allocated the cost of walking away.

A buyer does not need to reject every imperfect property. Spanish property has history, and many homes have a paper issue somewhere. The question is whether the issue is known, bounded, documented and reflected in the contract.

Document map

Document or recordWhat it provesWhat it does not proveBuyer risk if missing
Nota simple / Land RegistryRegistered owner, charges, registered descriptionThat every physical element has municipal planning approvalTitle may be clean while terrace, pool or guest unit is irregular
CatastroTax mapping, surface area and cadastral use for IBIUrban-planning legality or building licenceBuyer mistakes tax recognition for legalisation
Licencia de obrasTown hall authorisation for the works or projectThat the finished work matched it or can be occupiedWork may need legalisation, reduction or demolition
Final works certificateTechnician confirms completion under the projectThat the town hall accepted first use in every caseNew work declaration or utility sequence may stall
First-occupation licence or equivalentResidential use/habitability gate for the finished buildingThat later alterations were also licensedUtilities, mortgage, resale and visa accommodation evidence can weaken
AFO resolution in AndaluciaRecognised status for certain finished irregular buildings where restoration action is no longer possibleFull normal legality or a standard occupation licenceFuture works, valuation, financing and resale may be limited

Frequently asked questions

Does the Land Registry prove a Spanish property is legal?

No. The Land Registry proves title and recorded rights. It does not replace municipal planning due diligence. A property can be registered and still contain an unlicensed extension, an unregistered pool, a change of use or a first-occupation problem. For new or altered buildings, article 28 of the consolidated Land and Urban Rehabilitation Act links registry declaration of new work to the administrative planning title, technical certification and the authorisations needed for the intended use, but old entries and later works still need checking.

Is Catastro proof that an extension or pool is legal?

No. Catastro is mainly a tax and mapping record. It may show a pool, terrace enclosure or extra square metres because they were detected or declared for IBI purposes, but that does not mean the town hall granted a building licence or that the works are compatible with planning rules. Catastro helps identify discrepancies; it does not legalise them.

Can old illegal works in Spain become legal by prescription?

Not automatically. Time may prevent the administration from ordering restoration of legality in some cases, depending on the autonomous community, land classification and the type of work. That is different from full legalisation. Protected land, public domain, coastal restrictions and serious planning breaches may not benefit from ordinary limitation periods. Old is a fact; legal is a conclusion.

What is AFO in Andalucia?

AFO, asimilado a fuera de ordenación, is an Andalusian status for certain finished irregular buildings where the administration can no longer adopt restoration measures. It recognises a legal regime and can allow access to basic services under conditions, but it is not the same as a normal building licence or first-occupation licence. The Junta de Andalucia states that AFO applies where a finished building was built without the required planning licences or contrary to them and restoration action is no longer possible.

Can I use a property with missing first-occupation licence for the non-lucrative visa?

A deed can support proof of accommodation only if the home is genuinely available and habitable. If the property lacks the licence, declaration or equivalent document normally needed to show lawful residential use, utility connection or first occupation, it may be weaker evidence and may create timing problems. For a visa file, a clean lease or another property with clearer habitability evidence can be safer while the planning issue is resolved.

Sources reviewed August 2026: Real Decreto Legislativo 7/2015, consolidated Land and Urban Rehabilitation Act, especially article 28 on declarations of new construction and completed works, the planning approval or conformity required by territorial and urban-planning law, technical certification and authorisations needed for the intended use; Law 38/1999 on Building Regulation, including the final works certificate and the building agents' responsibilities; Directorate-General for Legal Certainty and Public Faith resolutions applying article 28 and treating the first-occupation licence or equivalent regional declaration as the usual administrative control of suitability for the intended use; Junta de Andalucia guidance on buildings in asimilado a fuera de ordenación status; Andalusian Decree 2/2012 on AFO, including the distinction between AFO and ordinary occupation or use licences; and current Andalusian urban-planning guidance under the LISTA framework. Urban-planning law is regional and municipal, and limitation periods and declaration systems differ by autonomous community. This page is general information, not legal advice on a specific property.

Property · Planning and first occupation

Buying a property with a planning question?

Tell us where the property is, what does not match, whether you have signed arras, and whether the home is part of a visa or renewal file.

✓ Thank you. We’ll review the property issue and reply within 24 hours.

Confidential · No obligation · Reply within 24 hours

Do not buy the square metres until you know which square metres are legal.

Planning due diligence, purchase wording and residence evidence should be checked before the deposit becomes expensive.

iMessage WhatsApp