If you purchase any kind of real estate you will have to pay the property transfer tax before signing the notarial deed (escritura).
Agricultural plots are taxed at 8% and building plots at 10% of the declared purchase price. All residential buildings, including apartments, have their property transfer tax levied according to the purchase price as specified in the notarial deed (escitura) or to their registered value, whichever is the highest. The tax brackets are changed annually by the government treasury and there are significant differences in the tax payable between price bands at lower levels. Nowadays, most properties will fall into the highest bracket at 10%.