When the seller of a property in Spain is not tax resident there, the buyer must withhold 3% of the price and pay it to the Spanish Tax Agency with form 211 within one month of the signing. This is set out in Article 25.2 of the consolidated Spanish Non-Resident Income Tax Law.
That 3% is a payment on account. The seller then declares the gain on the sale, taxed at 19%, with form 210; if the amount withheld is more than the tax due, the seller claims the difference back. If the withholding is not paid in, the property remains liable for that amount.
When you hand us the transaction, we file the form that applies to you: form 211 if you are buying from a non-resident and form 210 if you are the one selling.