Back to the blog
Investment

Selling a tenanted flat in Spain: why the tenant can stay and what your options are

Vladimir Shokov By Vladimir ShokovFounder, EVS PROPERTY GROUP 16 September 2026 · 10 min read
Vender un piso con inquilino: por qué no tiene que irse y qué opciones tienes

Selling a flat with a tenant in it does not mean the tenant has to move out early. The buyer steps into the landlord’s shoes, and the tenant keeps the right to renew the lease until it reaches five years, or seven if the landlord is a company, even if they signed a clause saying otherwise. The Provincial Court of Madrid has just confirmed this in a ruling handed down in July 2026.

It is a common question among owners. With a median asking price of €650,000 on the Costa del Sol and €625,000 in the city of Malaga, according to our monthly price report, it is only natural for anyone with a home on a long-term let to consider selling. Before putting it on the market, it pays to know what you can and cannot do with a tenant in place.

What did the Provincial Court of Madrid decide?

The case concerned a one-year lease with a very specific condition: once that year was up, the owner would put the property on the market and the tenant would have to leave without compensation, giving up any renewal. When the year ended, she went to court to have the lease terminated. Court of First Instance No. 1 of Fuenlabrada dismissed the claim, and the Provincial Court of Madrid upheld that decision and ordered her to pay the costs.

The owner argued that both parties knew about and accepted that condition when they signed. It was not enough. Spain’s Urban Leases Act (LAU) renders void any clause that reduces the protection the law itself gives tenants, even if the tenant signed it willingly. Agreeing an initial one-year term is perfectly lawful, but it does not take away the tenant’s right to renew the lease year by year until the legal minimum is reached. The ruling is not from the Supreme Court, but it applies what the law expressly says, so it is a sound reference in Andalusia too.

What happens to the tenant if the property is sold?

A sale does not end the tenancy. The new owner is subrogated into the lease, meaning they take on the same rights and obligations the seller had: they collect the rent, honour the time frames and, when the lease ends, they are the one who must return the deposit. These are the time frames they must respect:

  • Until the lease reaches five years, counted from its start and not from the sale, or seven if the landlord who signed it was a company. Until then, the tenant can keep renewing year by year and the buyer cannot stop it.
  • After that, up to three more years of tacit renewal if nobody gives notice in time: the owner must give at least four months’ notice of non-renewal, and the tenant two. During that extension, only the tenant can bring it to an end, giving one month’s notice before the close of each yearly period.
  • In addition, if the lease was in force on 8 October 2026 and expires before 31 December 2028, a tenant who has been up to date with the rent for at least eight months can request an extraordinary extension of up to two years under Royal Decree-Law 29/2026. The owner, including the buyer, can only refuse if they agree other terms or a new lease, or if they need the home for themselves or their first-degree relatives to live in.
  • If the lease stated that a sale would end it, that clause only takes effect once the five or seven years have passed.
  • If a longer term was agreed, the buyer must honour all of it, unless the lease was not recorded in the Land Registry and they bought in good faith: in that case they only have to reach the five or seven years, and the seller compensates the tenant.

Is a sale clause in a rental contract valid?

It depends on exactly what it says. This table sums up the most common clauses and agreements when the owner has a sale in mind:

Clause or agreement Is it valid? Legal basis
The tenant waives renewals if the property is sold No, it is void Arts. 6 and 9.1 LAU
A sale of the property will end the lease Only once five years have passed, or seven if the landlord is a company Art. 14 LAU
Initial term of one year Yes, but the tenant can renew up to five or seven years Art. 9.1 LAU
The tenant waives the right of first refusal No, if the lease was signed from 8 October 2026. In earlier leases, yes, but they must be given 30 days’ notice of the sale Art. 25.8 LAU
The owner will need the home to live in Yes, if stated at signing and the landlord is an individual, but it cannot be used to sell Art. 9.3 LAU
Exit agreement negotiated later, with compensation Yes, if the tenant freely agrees Agreement between the parties

Be careful with the owner’s-need clause: it only lets the landlord take the home back so that they or their first-degree relatives can live in it, and it must be written into the lease from the outset. Selling is not a need in that sense. If the owner relies on it and does not move in within three months of the tenant leaving, the tenant can choose between returning to the property or receiving compensation.

Does the tenant have a right of first refusal?

Yes. The owner must notify the tenant in a verifiable way, for example by burofax, a certified delivery service, of the price and terms of the sale, and the tenant then has 30 calendar days to buy on those same terms. This is the right of pre-emption, known in Spain as tanteo. In leases signed before 8 October 2026 there are two exceptions: the tenant waived it in the lease, or the whole building is sold in one go.

If they were not notified, if details were missing, or if the property ended up selling for less or on more favourable terms than those notified, the tenant can exercise the right of redemption, or retracto: taking the property in the buyer’s place by paying the same, within 30 calendar days of the buyer handing them a copy of the title deed. If the tenant waived this right in a lease signed before 8 October 2026, which is common, the owner must still give them at least 30 days’ notice of the sale.

For leases signed from 8 October 2026, Royal Decree-Law 29/2026 strengthens this right. A waiver can no longer be agreed, and the right is not lost when the home is sold together with other homes, commercial premises or the whole building, provided it is legally identifiable as a separate unit. The decree already applies, but it still has to be ratified by the Standing Committee of Congress (Diputación Permanente).

In a joint sale, the notice must state the price attributed to the rented home and how it was calculated, using objective criteria: preferably the cadastral reference value or, failing that, an independent valuation. A price allocation designed to prevent or obstruct the purchase has no effect against the tenant, and if the notice omits that price, the tenant can exercise the right of redemption.

What options does an owner who wants to sell have?

With forcing the tenant out off the table, there are four routes. None is better in the abstract: it depends on the rent, how long the lease has left to run and how quickly you need to sell.

Option Advantage Drawback
Sell with the tenant in place No waiting and no loss of rental income Fewer buyers, almost always investors, and a tighter price
Wait for the lease to end and do not renew The home sells vacant, at market price and to any buyer Four months’ notice is required and you must wait for the time frames to run out, which the tenant can stretch by up to two more years through the extraordinary extension
Negotiate an agreed exit Lets you sell the home vacant ahead of time The tenant must agree and usually asks for compensation
Offer the property to the tenant They may be the keenest buyer, and the redemption risk disappears It depends on them securing a mortgage

A tenanted home usually sells for less than the same property would fetch vacant, because buyers looking for a home to live in are ruled out and investors value it on its yield. The gap narrows when the rent is at market level, the tenant pays on time and the lease has little time left to run. If you go for an agreed exit, put everything in writing: the key handover date, the compensation and the condition of the property.

What should you check when buying a flat with a tenant?

For an investor, buying a tenanted home in Marbella means income from day one, but also inheriting a lease they did not negotiate. Before signing, ask for and check:

  • The full lease and the date it was signed: contracts from before 6 March 2019 may have different time frames from today’s.
  • The current rent, how it has been updated and proof of payment for recent months.
  • Whether the tenant waived the right of first refusal, which is only possible in leases signed before 8 October 2026, and, if not, that they were properly notified of the sale, including the price attributed to their home if it is sold together with others. Otherwise, they could take the property from you by paying the same price.
  • Whether there are rent arrears or any court proceedings under way: an eviction case in progress changes the value of the deal completely.

How should you approach selling a tenanted property?

The ruling leaves a clear lesson: a tenant’s departure cannot be secured with a clause signed at the start of the tenancy, only by respecting the time frames and notice periods set by law or through a later agreement. The sensible approach is to settle on a strategy before advertising the property: how long the lease has left, what price it would fetch with and without a tenant, and which type of buyer is the best fit.

At EVS PROPERTY GROUP we value vacant and tenanted homes in Estepona, Marbella and across the Costa del Sol, and we find the right buyer for each one, including investors who prefer a property that already produces rental income.

This article is for general information only and is not a substitute for a lawyer’s advice on your specific lease.

Frequently asked questions

Can you sell a rented flat in Spain?

Yes. The owner can sell whenever they wish and the tenant cannot prevent it, but the buyer will have to honour the lease and the tenant will have priority to buy on the same terms, unless they waived it in a lease signed before 8 October 2026.

How long must the new owner honour the lease?

Until the lease reaches five years from its start date, or seven if the previous landlord was a company, plus the tacit renewal of up to three years if they do not give four months’ notice. If a longer term was agreed, they generally have to honour all of it. And if the lease was in force on 8 October 2026 and expires before 31 December 2028, a tenant who is up to date with the rent can request an extraordinary extension of up to two more years.

Are there rent-pressure zones in Málaga that extend leases?

No. As of October 2026, the Andalusian regional government has not declared any rent-pressure zones, so the extraordinary extension of up to three years for those areas does not apply. A one-year extension is still possible if the tenant proves vulnerability and the landlord is a large-scale owner, and so is the extension of up to two years under Royal Decree-Law 29/2026, which does not depend on the area.

What happens to the deposit when a rented flat is sold?

The buyer also takes on the obligation to return it when the lease ends. That is why the seller should hand over the amount or have it deducted from the price in the title deed.

What next? The most useful thing after reading is to look at the real market: browse properties by city or tell us on WhatsApp what you are looking for — area, budget, timing — and we will prepare a tailored selection, with no obligation.

You may also find useful: sell your property invest on the Costa del Sol free valuation monthly price report

Related articles