When you sell a property, or when you finish paying up your mortgage instalments, you will need to discharge your mortgage liability from your title deed. When you sell your property, your buyer (or his lawyer) will demand a clean title from you.
This involves a conveyance procedure that requires you to hire a lawyer. He will draft a deed, and coordinate with your lender, to have it signed. Once signed, and witnessed by a notary public, it needs to be registered at the land registry so your property is fully discharged of the encumbrance.
The whole procedure takes on average 2 to 3 months. A power of attorney is required. Notary and land registry fees apply as well.
Related article
How to discharge a mortgage loan in Spain - 8th September 2023