If you are buying a detached villa, a cortijo or a rustic house in the countryside of Costa del Sol or Costa Almería, the single most important thing to confirm is not the price or the view — it is whether the property is legally recognised. Thousands of rural homes in Andalucía were built on non-developable land without a proper licence, and many can never be fully legalised. An AFO certificate (Asimilado a Fuera de Ordenación) is the mechanism the region uses to give some of these houses a formal, tolerated status — but it is not a full building licence and it does not make an illegal house legal.
In short: before you sign anything, your lawyer must establish whether the rural property is (a) fully legal, (b) illegal but eligible for an AFO / DAFO certificate, or (c) illegal and unsalvageable because it sits on protected land or has a demolition order. This single check decides whether you can get a mortgage, insure the house, extend it, connect utilities and ever resell it. This guide, focused on Costa del Sol (Málaga) and Costa Almería where the issue is most acute, explains exactly what to verify.
AFO stands for Asimilado a Fuera de Ordenación — literally "assimilated to out-of-planning". It is an administrative resolution issued by the local town hall (ayuntamiento) confirming that a building erected without a licence can no longer be subject to enforcement action because the legal deadline for the council to act (the plazo de prescripción) has expired. In most Andalusian rural cases that deadline is six years from completion of the works.
You will also see the term DAFO (Declaración de Asimilado a Fuera de Ordenación) used for the same procedure. Under Andalucía's current planning framework — the LISTA law (Ley 7/2021, de Impulso para la Sostenibilidad del Territorio de Andalucía) and its regulation — the AFO/DAFO regime is the recognised route to give tolerated status to eligible rural homes across Málaga and Almería provinces.
Crucially, an AFO certificate does not:
What it does do is allow the property to be registered, given a genuine legal status, connected to basic utilities under regulated conditions, and sold with far less risk than a home with no status at all.
During the boom years, rural land in the interior of Málaga province — around Ronda, Coín, Alhaurín, Mijas campo and the Axarquía — and across Almería's Almanzora Valley, Albox, Arboleas, Oria and the campo around Vera and Mojácar was heavily built on. Foreign buyers, especially British and Northern European, bought or self-built country houses on suelo no urbanizable (non-developable rustic land) where residential construction was never permitted, or where the plot was too small to build on legally.
The scale is significant: tens of thousands of properties across inland Almería alone are estimated to sit in some form of urbanistic irregularity. This is why the urbanistic legality check is far more important in rural Andalucía than in a modern coastal apartment block, where the status is almost always clean. If you are weighing a rustic plot at all, read our guide to buying land in Spain before committing.
| Status | What it means | Can you buy it? |
|---|---|---|
| Fully legal | Built with a valid licence, first-occupation certificate, correctly registered. Land was buildable. | Yes — treat as a normal purchase. |
| AFO / DAFO eligible | Built without licence but enforcement deadline expired; not on protected land. Tolerated "out of planning". | Yes, with caution — confirm the certificate is issued or obtainable, and budget for its cost. |
| Illegal & unsalvageable | On protected/special land (coastal, forest, flood, cultural), still within enforcement period, or subject to a demolition order. | No — walk away. |
This is the deal-breaker most buyers overlook. A property is excluded from the AFO regime — and effectively unbuyable as a home — if it stands on specially protected non-developable land (suelo no urbanizable de especial protección). In Costa del Sol and Costa Almería this typically includes:
If any of these apply, no certificate, no amount of time, and no lawyer can make the house safe to own. This is precisely why the pre-purchase due diligence is non-negotiable.
Do not rely on the seller's word or the estate agent's summary. A qualified independent lawyer — see our guide on choosing a real estate lawyer in Spain — should carry out these checks:
Obtaining an AFO/DAFO involves a technical architect's report, town-hall fees and a municipal tax. Costs vary widely by municipality and property size, but buyers typically budget several thousand euros — commonly in the region of €2,000 to €6,000+ depending on the town's tax rate (set as a percentage of the works' value) and the technical work required. Whether the seller obtains it before completion or the buyer takes it on is a negotiation point — always try to make it the seller's obligation, priced into the deal.
With a valid AFO, you can obtain regulated connections to water and electricity for the existing dwelling. Without any status, connecting or reconnecting utilities can be blocked. Insurance is also easier to obtain and mortgages, though still restrictive, become at least possible with some lenders.
An AFO or rustic resale is still a resale for tax purposes, so in Andalucía (Costa del Sol and Costa Almería) you pay ITP at 7% — considerably lower than the coastal Levante regions. For comparison, resale ITP is 9% on the Costa Blanca (Comunidad Valenciana, reduced from 10% for deeds signed from 1 June 2026) and 7.75% in the Costa Cálida (Murcia).
| Region | Autonomous community | Resale ITP |
|---|---|---|
| Costa del Sol | Andalucía | 7% |
| Costa Almería | Andalucía | 7% |
| Costa Cálida | Murcia | 7.75% |
| Costa Blanca | Comunidad Valenciana | 9% (from 1 June 2026) |
An important trap on rural property: the tax base is the higher of the purchase price or the cadastral valor de referencia. On cheap campo houses the reference value can exceed a low negotiated price, so you may pay ITP on a figure above what you actually hand over. Add the usual notary (~0.2–0.5%), land registry (~0.1–0.25%), lawyer (~1% + IVA) and gestoría (~€300); on a rural resale, budget roughly 10–13% on top of the price. Full detail is in our complete guide to taxes when buying property in Spain.
Only within strict limits. Because the building is "assimilated to out of planning", you may carry out conservation, repair and works needed for safety, health and habitability — a new roof, damp-proofing, rewiring. You may not extend the footprint, add a floor or build a new structure such as a large pool house. If your plan is to significantly enlarge a country home, an AFO property is the wrong choice — read our renovation permits guide before you buy.
Registering a rural AFO property for tourist letting can be difficult, because a valid first-occupation licence or habitability certificate is normally required. Check feasibility early with our Andalucía tourist rental licence guide — do not assume income you may not legally be able to earn.
The problem exists in both provinces, but its shape differs. In Málaga (Costa del Sol), irregular rural builds cluster in the hills behind the coast — the Axarquía, Coín, Alhaurín and the Mijas countryside — where land values are higher and legalisation costs proportionally larger. In Almería, the volume is greater and prices lower, especially in the Almanzora Valley and the campo around Albox and Arboleas, where entire communities of foreign-owned country homes exist in various states of irregularity. Lower entry prices in Almería are attractive, but the legality risk per property is arguably higher — making due diligence even more essential. For a wider comparison of these coasts, see our four-coasts comparison.
Yes. A property with a valid AFO/DAFO certificate has a recognised, tolerated legal status and can be lawfully bought and sold. The risks lie in restrictions on extending it, tighter mortgage and insurance options, and confirming the certificate genuinely exists or is obtainable.
They refer to the same regime. AFO is the status (Asimilado a Fuera de Ordenación) and DAFO is the town hall's formal declaration of that status (Declaración de Asimilado a Fuera de Ordenación). In practice the terms are used interchangeably in Andalucía.
Fully illegal properties are almost impossible to mortgage. AFO properties can sometimes be financed, but many lenders decline them or offer lower loan-to-value ratios. Speak to a specialist before assuming you can borrow — see our non-resident mortgage guide.
No. Buildings on specially protected non-developable land — natural parks, coastal public domain, flood zones — are excluded from the AFO regime and cannot be legalised. Confirm the land classification before making any offer.
It is negotiable. Best practice is to require the seller to obtain and pay for a valid AFO before completion, or to reduce the price to cover it. Never complete on a promise that one will be arranged "later".
No — the AFO status itself doesn't change the tax. As a resale in Andalucía you pay 7% ITP, calculated on the higher of the price or the cadastral valor de referencia.
Rural property in Costa del Sol and Costa Almería can offer wonderful value and space — but only if the legality is clean. At Mediter Real Estate we help international buyers verify AFO status, land classification and every document before a euro changes hands, across the Costa del Sol, Costa Almería, Costa Cálida and Costa Blanca. Considering inland Andalucía more widely? Contact Mediter Real Estate today and let our team check your rural property is a home you can safely own — not a legal problem you inherit.
We use what you tell us here only to answer you. Privacy