Buying & selling · · 24 min read
Selling an Occupied Flat in Madrid in 2026: Occupation Without Title, Breaking into a Dwelling, Tenants Who Stay and Precario, How to Recover the Home, Fast-Track Trials, Express Eviction, Taxes and What to Tell the Buyer
The difference between usurpation, breaking into a dwelling (allanamiento de morada), the so-called “inquiokupación” and precario; the routes to recover your home (a criminal complaint and fast-track trials since April 2025, the express eviction of Law 5/2018, eviction for non-payment or end of contract, and mediation); how vulnerability affects it; and whether you can sell the occupied home: to whom, what to tell the buyer, how the deed is signed and which taxes apply. With what to do on day one.

Finding out that someone is living in your flat without your permission, or that a tenant will not leave, is a difficult situation, and it is natural to wonder whether you can sell it as it is. You can, but the buyer, the price, the mortgage and what has to be signed all change. And first you need to know what type of occupation you are dealing with, because the routes to recover the home depend on it.
We explain it with the rules and official information available on 9 November 2026, for the Comunidad de Madrid (the Madrid region) and, for municipal taxes, for the city of Madrid. If your case is a tenant who has stopped paying, the step-by-step guide is in “Tenant Not Paying Rent in Spain in 2026: What Landlords Can Do, from Burofax to Eviction”; here we focus on occupation and on selling.
The essentials in one minute
- The law distinguishes usurpation of an empty property (art. 245 of the Criminal Code), breaking into your dwelling, including a second home where you spend time (art. 202), the tenant who does not pay or will not leave, and precario, where someone came in with your permission.
- Report it as soon as possible and gather evidence. Since 3 April 2025, breaking into a dwelling and usurpation can go through fast-track trials.
- The civil express eviction of Law 5/2018 is for individuals, non-profit organisations and public social housing bodies, not for any company.
- Do not cut off utilities, change the lock or force your way in without talking to a lawyer.
- You can sell an occupied home, but you must tell the buyer and put it in writing. Normally they will not be able to get a mortgage on it.
- While it is occupied you keep paying the IBI (property tax) and the community fees. In Madrid there is a water bill discount for those affected.
Four different situations: usurpation, breaking into a dwelling, “inquiokupación” and precario
In everyday Spanish almost everything is called “okupas” (squatters), but the law treats each case differently:
- Usurpation (art. 245 of the Criminal Code): someone occupies another person’s property that is nobody’s dwelling, such as an empty flat or one for sale, without permission, or stays against the owner’s will. Without violence it is a minor offence, punished with a fine of three to six months; with violence or intimidation, the penalty is one to two years in prison, plus whatever applies for the violence.
- Breaking into a dwelling, allanamiento de morada (art. 202 of the Criminal Code): someone enters or stays in another person’s dwelling against their will, whether it is the main home or a second home where life is carried on, even occasionally. The basic penalty is six months to two years in prison.
- “Inquiokupación”: a colloquial term for a tenant who came in with a contract and stops paying or will not leave when it ends. It is not usurpation: it is resolved through a civil eviction (and if the contract was a deception, there may be fraud).
- Precario: you let a relative or acquaintance use the home for free, without a contract, and they will not leave. It is recovered through an eviction for precario.
The line between usurpation and breaking into a dwelling does not depend on the furniture, but on whether someone carries on their private life there. This is how the Attorney General’s Office puts it:
So-called second homes or seasonal homes are considered dwellings, provided that the private life of their lawful possessors is carried on in them, even occasionally.
Instruction 1/2020 of the Attorney General’s Office (BOE of 25 September 2020) (our translation)
What to do on day one
- Check from the outside, without going in or confronting anyone, and ask the neighbours what they have seen.
- If it is happening right now, call 112, 091 (National Police) or 062 (Guardia Civil). Under the Interior Ministry’s 2020 protocol, if it is a dwelling and the offence is caught in the act, officers can evict and identify the occupiers immediately.
- Report it as soon as possible. Take your ID, the deed or a nota simple (Land Registry extract), IBI, community and utility bills, your padrón (municipal registration) if you live there, photos, the date of your last visit and witnesses’ details.
- Speak to a lawyer that same day: they will tell you which route suits you and request urgent measures.
- Tell your insurer and keep a written record of everything that happens.
- Do not cut off electricity or water, change the lock, force your way in or offer money without your lawyer.
People often say there are “48 hours” to act. Neither the Attorney General’s Instruction 1/2020 nor the 2020 police protocol sets such a deadline: what counts is being caught in the act, whether it is a dwelling and the evidence. So the sooner you report it, the better.
Be careful with utilities. In judgment 426/2026 of 24 June, the full Criminal Chamber of the Supreme Court upheld a conviction for coercion against someone who cut off the electricity to a home where a person with the right to use it was living. In passing it noted that cutting off utilities to someone with some title, even a disputed one, is not the same as doing it to someone with none, a paragraph four judges disagreed with (Sepín, 7 September 2026). At the start you do not know what the people inside will claim, so do not do it without legal advice. Throwing someone out yourself or forcing your way in can be an offence of coercion or of taking the law into your own hands (realización arbitraria del propio derecho), even if the home is yours.
The criminal route: complaint, precautionary measures and fast-track trial
If the home is your dwelling, the police can act on the spot if the offence is caught in the act. If it is an empty flat and it is not discovered as it happens, a court order is needed: you prove it is yours and that you do not consent, officers check that the occupiers have no title, and the court can order, as a precautionary measure, eviction and return of the property (art. 13 of the Criminal Procedure Act). The Attorney General’s Office asks for this to be requested with “the greatest urgency” and for the occupiers to be heard first.
Organic Law 1/2025 on the efficiency of the Public Justice Service (BOE of 3 January 2025) added two cases to article 795 of the Criminal Procedure Act, which governs fast-track trials: “i) Offences of breaking into a dwelling under article 202 of the Criminal Code” and “j) Offences of usurpation under article 245 of the Criminal Code” (our translation). It came into force three months later, on 3 April 2025.
In practice, if the case starts with a police report and the suspect has been arrested or summoned before the duty court, the trial must be scheduled within fifteen days of the accused appearing. With nuances: usurpation without violence is a minor offence and, according to the Attorney General’s Circular 1/2025, goes through the minor-offence procedure; breaking into a dwelling that does not meet the requirements goes to the jury court. If the accused admits the facts, the sentence is reduced by a third.
The civil route: the express eviction of Law 5/2018
Law 5/2018, in force since July 2018, created a fast civil procedure to recover an occupied home (art. 250.1.4 of the Civil Procedure Act, LEC). It is not open to everyone:
The following may request the immediate recovery of full possession of a home or part of it, provided they have been deprived of it without their consent: the individual who is its owner or lawful possessor under another title, non-profit organisations entitled to possess it and public bodies that own or lawfully possess social housing.
Civil Procedure Act, article 250.1.4, second paragraph (wording of Law 5/2018) (our translation)
The claim can be brought against “the unknown occupiers”. If you request immediate handover, the court gives them five days to produce a title; if they do not and yours is sufficient, it orders the immediate handover by court order, with no appeal (art. 441.1 bis LEC). They can only object by arguing that they have a title against you or that you have none, and if they do not reply, judgment is given straight away. This route does not require a prior attempt at negotiation, because Organic Law 1/2025 exempts summary protection of possession (art. 5.2). With their consent, the court informs social services so that they can take protective measures within seven days.
If they came in with a contract or with your permission: eviction and precario
If there is or was a tenancy agreement, the route is eviction for non-payment or for expiry of the term (art. 250.1.1 LEC). Before filing you must attempt a negotiation and prove it, and since Organic Law 1/2025 judgment is given within five days of the hearing. The full process is in “Tenant Not Paying Rent in Spain in 2026: What Landlords Can Do, from Burofax to Eviction”.
If you let someone use the home for free and they will not give it back, it is precario: it is claimed through the eviction of article 250.1.2 LEC, which can be brought by the owner, the usufructuary or anyone entitled to possess it, including a company. Here too you must try negotiation first. Keep evidence that the arrangement was free and that you asked for the home back, for example with a burofax (certified letter).
Mediation and exit agreements
Talking is not giving up. An agreement can save months: a move-out date, handing over the keys and sometimes help with moving costs. Do it in writing, with your lawyer and with a specific date, and do not pay anything up front without guarantees.
The routes compared
| Route | When it applies | Who requests it | Deadlines set by law | Cost |
|---|---|---|---|---|
| Complaint for breaking into a dwelling (art. 202 CP) | Your main home, or a second home where you spend time, is occupied | Whoever lives there, to the police, Guardia Civil or duty court | If caught in the act, the police act at once. In a fast-track trial, since 3-4-2025, trial within 15 days of the accused appearing | Reporting is free; to join the case, a lawyer (fees are not regulated) |
| Complaint for usurpation (art. 245 CP) | Empty property that is nobody’s dwelling | The owner or possessor | If not caught in the act, eviction with a court order, with “the greatest urgency” according to the prosecutor. Without violence, minor-offence trial | As above |
| Express eviction (arts. 250.1.4 and 441.1 bis LEC) | You have been deprived of the home without your consent | Individual owner or lawful possessor, non-profit organisation or public social housing body | 5 days to produce a title; otherwise an immediate handover order with no appeal. No prior negotiation | Usually a lawyer and a court agent (procurador) |
| Eviction for precario (art. 250.1.2 LEC) | You let someone use the home for free and they will not return it | Owner, usufructuary or anyone entitled to possess it, including a company | Prior negotiation mandatory; oral proceedings (juicio verbal) | Usually a lawyer and a procurador |
| Eviction for non-payment or end of term (art. 250.1.1 LEC) | There is or was a tenancy agreement | The landlord | Prior negotiation mandatory; judgment within 5 days of the hearing | Usually a lawyer and a procurador |
| Mediation or agreement | At any time, if the other side is willing | Either party | No legal deadline | Mediator or lawyer; written agreement |
Legal deadlines, not real durations: these depend on the court, on notifications and on any suspension for vulnerability. There are no official statistics on the average duration of each route. Sources: Criminal Code; LEC after Law 5/2018 and Organic Law 1/2025; Attorney General’s Instruction 1/2020; Interior Ministry protocol of 2020.
Vulnerability and suspension of evictions
If vulnerable people live in the home, it can still be recovered, but the law requires them to be taken into account. In the express civil route the court informs social services, and in the criminal route the prosecutor asks that, where there are minors, people with disabilities or people in destitution, social services take protective measures before the eviction.
Since 2020, extraordinary suspensions have also been approved. Article 1 bis of Royal Decree-law 11/2020 allowed evictions of vulnerable households with no housing alternative to be suspended even if they had no title, but only if the home belonged to a legal entity or to an individual with more than ten homes, and in the criminal route it excluded cases with intimidation or violence (Constitutional Court judgment 169/2025, BOE of 26-12-2025). It has been extended several times.
Royal Decree-law 29/2026, in force since 8 October, sets up a regime to suspend evictions of vulnerable people with no housing alternative until 31 December 2030, for a maximum of three years and with a review every twelve months. According to Cuatrecasas, the defendant’s vulnerability does not prevail if the claimant is an individual with two homes or fewer, unless they are a large holder (gran tenedor). Whether it reaches your proceedings depends on its wording and the type of claim, and its ratification was due to be voted on 12 November: check the result and ask your lawyer. What was being voted on is in “Spain's Housing Decrees Vote on 12 November 2026: What Is Being Voted On, What Is Already in Force and What Happens to Your Rental If They Fall”.
The official figures, read with care
According to the Government reply of 4 March 2025, with data from the Ministry of the Interior’s Crime Statistics System, 1,543 offences of usurpation of property became known in the Comunidad de Madrid in 2021, 1,406 in 2022, 1,406 in 2023 and 1,307 in 2024, and 117, 111, 110 and 144 of breaking into a dwelling. In Spain as a whole, usurpation went from 16,833 offences in 2021 to 15,911 in 2024, and breaking into a dwelling from 441 to 515. These are police figures, they include properties that are not homes and they do not say how many occupations are still ongoing.
Can you sell an occupied home?
Yes. Occupation does not take away your ownership: the notary authorises the deed and the Land Registry records the buyer as in any sale. What you cannot do is hand over possession, and that changes who buys and how much they offer. There are two paths: recover the home first and sell it vacant, or sell it occupied to someone who takes on the situation. Occupied homes are usually bought by:
- Private buyers who know the situation and can wait, usually with their own savings, because a mortgage is difficult.
- Investors and companies who manage the recovery themselves. A trading company cannot use the express eviction of Law 5/2018 and will have to use other routes, which weighs on its offer.
- Neighbours or the community of owners itself, who live with the situation close up. If the community buys, a resolution of the owners’ meeting is needed, reviewed by its property manager and a lawyer.
How much less is paid? We have not found any official statistics on the discount, so we do not give a figure. It depends on the type of occupation, the stage of the proceedings, whether there may be suspensions, the condition of the home and who is buying. If you are given a fixed percentage without anyone knowing your case, ask where it comes from.
What to tell the buyer and what to sign
Hiding the occupation is not an option: the buyer could claim against you later, for example asking for the sale to be annulled for deception or for compensation. What protects you is telling them from the start and in writing: who is inside, since when, whether they claim any title, what complaints and claims exist, with their case numbers, and what stage they are at. Clauses your lawyer can consider in the arras (deposit contract) and the deed (more in “The Arras Contract in Spain in 2026: Deposit Types, How Much to Pay, Deadlines and What to Check Before Signing”):
- That the home is sold occupied, without handover of possession, and that the buyer knows and accepts this.
- Who pursues the proceedings and pays their costs from signing: you until the eviction, or the buyer in your place.
- How it is paid: all at the notary’s office, or part held back until the home is recovered, with a deadline and what happens if it is not achieved.
- What happens if the occupiers leave before signing and who is liable for any damage.
- From when the buyer pays the IBI, community fees and utilities.
If civil proceedings are already under way, the law generally allows whoever buys the disputed property to ask to take the seller’s place (procedural succession); in the criminal route, the court will decide how the new owner takes part. Agree on it before signing. Why a lawyer is worth it is explained in “Do I need a lawyer to sell or buy a flat in Spain? What they do, how much it costs and when it is worth it”.
Mortgage, valuation and deed
The bank needs an official valuation, and the occupancy status is among the minimum checks. If the valuer cannot carry them out, the valuation comes with conditions and, until they are resolved, the bank cannot accept it for the mortgage (Tinsa, 2026). That is why buyers of occupied homes usually pay with their own funds, and why recovering the home before selling opens the door to many more buyers (more in “Property valuation (tasación) in 2026 when buying or selling in Madrid: who pays, how long it lasts, what happens if it comes in below the price and the latest appraised value”).
The deed requires the usual documents: nota simple, community certificate, latest IBI bill and energy certificate. If the assessor cannot get in to do the energy certificate, raise it with your lawyer and the notary beforehand. The full list is in “Documents Needed to Sell a Flat in Madrid in 2026: Full Checklist, Where to Get Them and What They Cost”.
Taxes when selling an occupied home
Selling an occupied home does not change the taxes, but it does change the numbers. In IRPF (income tax), the gain or loss is the difference between what you receive and what the home cost you, including the expenses and taxes of buying and selling. The gain is taxed in the savings base: 19% up to €6,000, 21% up to €50,000, 23% up to €200,000, 27% up to €300,000 and 30% above that (state and regional rates added together, Spanish Tax Agency, 2025 tax year). If you sell for less than it cost you, the loss can be offset against other gains under the law.
Illustrative example: with a gain of €30,000 and no other savings income, the first €6,000 would be taxed at 19% (€1,140) and the remaining €24,000 at 21% (€5,040): €6,180 in total. There may be exemptions linked to your main home; we cover them in “Taxes When Selling a Flat in Spain in 2026: Plusvalía Municipal in Madrid, Income Tax (IRPF) and Exemptions”.
The plusvalía municipal (municipal capital gains tax on land) is, as a rule, paid by the seller. In the city of Madrid the rate is 29% and you can ask for the cheaper method: the objective one, with the cadastral value of the land and a coefficient based on the years held, or the actual one, with the real gain. If you sell for no more than you paid, there is no increase and nothing is due. It is self-assessed within 30 working days (Guía Fiscal, based on Madrid’s bylaw). A price reduced because of the occupation lowers the plusvalía calculated with the actual method.
The buyer pays ITP (property transfer tax): in the Comunidad de Madrid, 6% as a rule, with reductions in some main-home cases, such as large families. The tax base is the Catastro (land registry) reference value or the declared price, whichever is higher, and it is filed on form 600 within 30 working days (Comunidad de Madrid, 3 November 2026). If the agreed price is below the reference value, the buyer will be taxed on that value unless they challenge it with an adviser. For under-40s buying from 2027, see “Madrid Cuts Property Transfer Tax (ITP) to 4% for Under-40s from 1 January 2027: Requirements, Savings and What Happens If You Buy in December”.
IBI, community fees and utilities while it is occupied
As long as you are the owner, you pay the IBI and the community fees even if you cannot use the home; if you sell, agree from when the buyer takes them on.
With utilities in your name you will keep receiving bills; before cancelling them, talk to your lawyer. For water there is help: Order 3713/2022 of the Comunidad de Madrid gives a 100% discount on the Canal de Isabel II service charge and consumption to the contract holder, or the lawful possessor using the supply, who proves proceedings for breaking in, usurpation or recovery of possession. It lasts six months, renewable for further six-month periods until the home is recovered. Check the current conditions with Canal.
Insurance with occupation cover
Some home and legal-expenses policies cover occupation (defence in the proceedings, locksmith, cleaning or damage). Check whether it covers a second home or an empty home, whether there is a waiting period, what limits it has and whether it includes a tenant who does not pay, which is usually a separate product, rent default insurance.
How to prevent it if the flat is empty
- Visit often and make it visible that the home is used.
- Improve the door and the lock, and consider an alarm with alerts.
- Leave your phone number with a trusted neighbour or the concierge.
- Keep the deed or nota simple and the IBI and utility bills to hand.
- Do not post on social media that the home is empty.
- If you are not going to use it, consider letting or selling it: we explain it in “I Have an Empty Flat in Madrid or Barcelona in 2026: IBI Surcharge, Catalan Empty-Homes Tax, Income Tax, Public Schemes to Let It with Guarantees and What the Decrees Change”.
How we do it at Llavely
Let us be clear: Llavely does not sell occupied homes or handle evictions. If your home is occupied, it first has to be recovered with a lawyer through the appropriate route. Once it is vacant, or if you want to sell with a tenant who has a contract in force (we explain it in “Selling a Rented Flat with a Tenant in Spain in 2026: Right of First Refusal (Tanteo y Retracto), Price and Options”), we handle the sale anywhere in the Comunidad de Madrid: you contact us and we take care of everything. We review every home in under 24 hours, and the valuation, photos, video, floor plan and virtual tour are included.
Before showing your home we talk to every buyer to understand what they are looking for and how they would pay, and our specialist lawyers review the documents, prepare the calculation of the taxes due, draft the arras and go with you to the notary. You pay 2.5% + VAT of the price, only if it sells. If you want to know what your home is worth once vacant, ask for your free valuation.
Frequently asked questions
Can you sell an occupied flat in Spain?
Yes. You can sell and sign the deed, but not hand over possession, so the buyer takes on the situation, usually without a mortgage: the valuation comes with conditions if the occupancy status cannot be checked. It is advisable for a lawyer to prepare the arras and the deed.
Do I have to tell the buyer that the home is occupied?
Yes. Hiding it exposes you to the buyer later asking for the sale to be annulled or for compensation. Put it in writing in the arras and the deed: who is inside, what proceedings exist, who pursues them and how the price is paid.
Can a company that buys an occupied flat use the express eviction?
No. Law 5/2018 reserves it for individual owners or lawful possessors, non-profit organisations entitled to possess the home and public social housing bodies. A company will have to use other routes, such as the criminal route or precario.
Is it true there are 48 hours to evict?
There is no such deadline in the law. The police can act without a court order if the offence is caught in the act, especially in a dwelling; otherwise the court decides. That is why it pays to report it as soon as possible and with evidence.
Can I cut off electricity and water if my flat is occupied?
Not without consulting a lawyer. In 2026 the Supreme Court upheld a conviction for coercion against someone who cut off the electricity to a person entitled to use the home. It noted that it is not the same if the occupier has no title, but that was not the case being decided and there were dissenting opinions.
How long does it take to recover an occupied home?
There are no official statistics on the average duration. The law sets short deadlines (15 days to schedule a fast-track trial, 5 days to produce a title in the express eviction), but the real duration depends on the court and on possible suspensions.
Who pays the IBI and community fees while it is occupied?
You do, as long as you are the owner. If you sell, agree from when the buyer pays. In the Comunidad de Madrid you can ask Canal de Isabel II for the water discount if you prove the proceedings.
What taxes apply if I sell an occupied home?
The same as in any sale: IRPF on the gain, from 19% to 30% in the savings base, and plusvalía municipal, which is not due if there is no increase in value. The buyer pays ITP, 6% as a rule in Madrid, on the reference value if it exceeds the price.
Sources
- Organic Law 1/2025 of 2 January on measures for the efficiency of the Public Justice Service: article 5, thirty-eighth final provision and amendment of article 795 of the Criminal Procedure Act (BOE – Spain’s Official State Gazette no. 3, 3 January 2025)
- Law 5/2018 of 11 June amending the Civil Procedure Act in relation to the unlawful occupation of homes (BOE no. 142, 12 June 2018), text reproduced by the journal El Notario
- Instruction 1/2020 of 15 September of the Attorney General’s Office on criteria for requesting precautionary measures in offences of breaking into a dwelling and usurpation of real property (BOE no. 255, 25 September 2020)
- Ministry of the Interior: instruction of the Secretary of State for Security with a police protocol for the unlawful occupation of property (press release, 17 September 2020)
- Government reply to written question 184/19204: known offences of breaking into a dwelling and usurpation of property by province, 2021-2024, from the Ministry of the Interior’s Crime Statistics System (Congress of Deputies, 4 March 2025)
- Constitutional Court, Judgment 169/2025 of 17 November on the suspension of evictions under article 1 bis of Royal Decree-law 11/2020 (BOE no. 311, 26 December 2025)
- Royal Decree-law 29/2026 of 6 October and the real estate sector: eviction suspension regime until 31 December 2030 (Cuatrecasas, October 2026)
- Tax rates on the savings tax base, Income Tax 2025 help manual (Spanish Tax Agency, English version)
- Property transfer tax (Transmisiones Patrimoniales Onerosas): rates, tax base and filing deadline (Comunidad de Madrid, updated 3 November 2026)
- Order 3713/2022 of 26 October of the Regional Ministry of Environment, Housing and Agriculture: discount on the Canal de Isabel II water bill when a home has been occupied (BOCM – Madrid Regional Gazette no. 257, 28 October 2022)
- Fast-track trials for usurpation and breaking into a dwelling (Sepín legal blog, 21 July 2025)
- Cutting off utilities in an occupied home and the offence of coercion: Supreme Court judgment 426/2026 of 24 June (Sepín legal blog, 7 September 2026)
- Fast-track trials for breaking into a dwelling and usurpation of property: an analysis of the Organic Law 1/2025 reform (Tirant lo Blanch, legal dossier, 2025)
- Plusvalía municipal tax rate in Madrid: objective method, actual-gain method and deadlines (Guía Fiscal, accessed 9 November 2026)
- Conditional valuations and valuations with warnings: what they mean for a mortgage (Tinsa, 16 September 2025, updated 22 April 2026)