← Analysis

The short answer: yes, you can hand your home to the bank to clear your mortgage in Spain, but only if the lender agrees. Nobody can force a creditor to accept something other than what it is owed (article 1166 of the Civil Code). The exception is the Code of Good Practice in Royal Decree-law 6/2012: if your lender has signed up and you meet its conditions, it must accept the handover (dación en pago) and the whole debt is cancelled. Otherwise it is a negotiation, and done well it can suit both sides.

In this article
  1. What a dación en pago is
  2. When the lender must accept: the Code of Good Practice
  3. What the borrower gains
  4. What the lender gains, and what it risks
  5. Taxes: what you pay and what the new owner pays
  6. Similar ways out, from least to most conflict
  7. Common mistakes
  8. When it makes sense to get help
  9. Frequently asked questions

What a dación en pago is

It means handing over an asset, usually the mortgaged home, to pay a money debt. The Civil Code does not regulate it under that name: it rests on freedom of contract (article 1255) and on the rules on payment. In a related figure, the assignment of assets to creditors, the debtor is only released up to the net value of what was handed over, unless agreed otherwise (article 1175). The lesson: if your home is worth less than you owe, the agreement must say in writing that the debt is cancelled in full. If not, you may still owe the shortfall, because you answer with all your assets (article 1911).

When the lender must accept: the Code of Good Practice

Royal Decree-law 6/2012 is still in force. Its Code of Good Practice is voluntary for lenders (article 5.1), but binding on those that sign up once you prove you meet the exclusion threshold (article 5.4). Ask in writing whether your lender has signed up: if you have missed a payment, it must tell you (article 5.9).

The handover is compulsory if all of this applies at once:

The lender must then take the home and the debt is cancelled, guarantors included (section 3.b). If you ask at that point, you can stay on for two years as a tenant at annual rent of 3% of the debt (section 3.c). If the lender does not comply, you can complain to the Banco de España (article 6.6).

If a fund has bought your loan: for sales from 8 October 2026, the new article 25 bis.2 of Law 5/2019 keeps the Code rights of the original lender. It comes from Royal Decree-law 29/2026, not yet shown as ratified by Parliament in the official gazette: check its status. We explain it in a fund has bought my mortgage.

What the borrower gains

What the lender gains, and what it risks

It saves time and stays out of court. It gets the keys and your cooperation, so it can sell sooner. And it avoids a risk: if the flat is the main home of a vulnerable family, eviction after a repossession can be suspended until 15 May 2028 (article 1.1 of Law 1/2013).

Its reasons to hesitate, worth knowing:

When I look at a deal like this I run the lender's sums: the flat's value today, minus tax, the property's debts and the cost of recovering it through the courts. If the handover beats that figure, there is room for a deal.

Taxes: what you pay and what the new owner pays

For you, the borrower

Income tax (IRPF). The gain is exempt when you hand over your main home, as borrower or as guarantor, to cancel a mortgage on it with a bank or other professional lender, if you have no other assets sufficient to pay the whole debt (article 33.4.d of the IRPF Act). If you sell to a third party to pay, this exemption does not apply as such.

Municipal capital gains tax (plusvalía). Exempt in the same cases (article 105.1.c of the Local Finance Act). Nobody in your household may have other sufficient assets (presumed, but it can be checked later), and you must have been registered at the home for the previous two years without a break, or since you bought it if less.

If part of the debt is written off, ask how it is taxed before signing.

For whoever takes the flat

A property taken in payment of a debt pays transfer tax (article 7.2.A of the transfer tax act), due from the buyer (article 8.a). In the Valencia region the general rate is 9% since 1 June 2026, and 11% if the property is worth more than one million euros (article 13.Uno of Valencian Law 13/1997). As a rule the base is the cadastral reference value or the declared value, if higher (article 10.2). You can estimate it with our transfer tax calculator.

Similar ways out, from least to most conflict

Common mistakes

When it makes sense to get help

When you owe several payments and the bank does not answer, when you are offered a handover and have doubts, or when a fund has bought your debt. You can book a consultation.

Frequently asked questions

Can I give my house to the bank to cancel my mortgage in Spain?

Yes, if the bank agrees. You cannot force it (article 1166 of the Civil Code) unless it has signed up to the Code of Good Practice in Royal Decree-law 6/2012 and you meet its conditions.

Does the bank have to accept a dación en pago?

No, as a rule. Only if it has signed up to the Code of Good Practice, you meet its conditions and there is no announced auction and no later charge.

Do I pay tax if I hand over my home in lieu of the debt?

Usually not. If it is your main home and you have no other assets to pay, the gain is exempt from income tax (article 33.4.d) and from municipal capital gains tax (article 105.1.c of the Local Finance Act).

Can I keep living in the house after the handover?

Yes, if it is agreed. Under the Code of Good Practice, two years as a tenant at annual rent of 3% of the debt.

What tax does the new owner pay in the Valencia region?

Transfer tax at 9% since 1 June 2026, or 11% if the property is worth more than one million euros (article 13.Uno of Valencian Law 13/1997).