Buying resale property in Spain follows a fairly fixed sequence, and skipping steps or doing them out of order is where most avoidable problems start.
First, an NIE number (foreigner's tax ID) — required for essentially every step that follows, including opening a Spanish bank account if you don't already have one.
Second, due diligence on the specific property: nota simple from the Land Registry, confirmation of no outstanding debts or embargoes, and confirmation the licence situation is clean.
Third, the private purchase contract (contrato de arras), typically with a 10% deposit, which sets the price, completion date, and penalty terms if either side withdraws.
Fourth, completion at the notary, where the title deed (escritura) is signed, taxes are calculated, and the property is registered in your name. In La Duquesa, this whole process typically runs 6-10 weeks from accepted offer to keys, assuming the paperwork is clean from the start.