If your husband changes the alarm/lock codes so you cannot access your home, that can be a criminal act in Spain (illegal lockout, coercion, usurpation or related offences). Don’t try to “fix” it by doing anything illegal yourself — take steps to protect your safety and your legal rights. Below I’ll explain what’s likely going on under Spanish law, what immediate steps to take, and how to document evidence for police/courts.
Why this can be illegal (legal frame)
- Changing locks/codes to prevent someone from entering their home can be treated as coercion (coacciones) or as conduct that prevents a person from legitimately enjoying their dwelling — a criminal matter. Article summaries and legal commentaries treat deliberate lockouts as potentially falling under coercion or obstruction of access. abogadospropietarios.com+1
- Where someone is effectively excluded from their home, there may also be offences such as allanamiento de morada (unauthorised entry into a dwelling) or usurpación (taking possession of property), depending on the facts and whether force or deceit is used. The Penal Code and specialist analyses discuss these different offences. MJusticia+1
- Changing locks to deny access is not the lawful way to evict someone — Spanish law requires judicial procedures for eviction. Case law and practical guides note that changing locks or denying access without a court order is unlawful. desahucio.abogado
Immediate steps to protect yourself (practical, ordered)
- Safety first. If you or anyone in the home is in danger, call emergency services (112) right now. If you are locked out and vulnerable (children, elderly, medication needs), treat it as an emergency.
- Call the police and file a denuncia (report). Go to the nearest Policía Nacional or Guardia Civil station or use the telematic reporting service to report the lockout and any threats. Tell them you were prevented from accessing your home and ask them to record it. The police can take immediate steps and will advise on urgent remedies. Spain Explained+1
- Contact the alarm/security company. If a remote code change was made, the provider can confirm code changes, provide access logs, and may be able to restore your access — and their records are useful evidence. Ask them for written confirmation/logs.
- Preserve evidence. Take photos/videos of the door/locks, save texts/messages/emails where the change or threats are discussed, note dates/times, and keep any security-app screenshots or emails from the alarm company. Don’t tamper with the system if investigators may need it.
- Do NOT try to forcibly re‑enter or remove/change locks yourself (unless you have legal ownership and have taken legal advice). Forcible entry could complicate your legal position. If you are the owner and need urgent access, a locksmith acting on your authority is a lawful option — keep receipts and ID.
- Ask police for immediate measures. Police can issue a report, and depending on the facts they may take steps to prevent further coercion or advise on emergency protective orders (particularly where there is domestic violence). Despacho de abogados en Marbella
- Seek legal advice quickly. A Spanish lawyer experienced in family/domestic law or criminal law can advise whether to pursue a criminal complaint, request an emergency injunction, or seek protective measures (especially if there is a history of threats or violence).
- If this is part of abuse, mention it explicitly. If there’s emotional/psychological abuse, threats, or repeated controlling behaviour, tell the police and lawyer — there are specific protections and criminal provisions for gender‑based or domestic violence. Baker McKenzie Resource Hub+1
What authorities will look for / what helps your case
- Proof of ownership/residency (deed, rental contract, bills).
- Messages, emails or recordings showing the other person changed codes or stated intent to lock you out.
- Alarm/security company logs showing code changes or remote administration.
- Photos/video showing the lock/door status and any physical signs.
- Any history of threats, prior police reports, or related incidents.
Quick dos and don’ts
- Do: call police, collect and save evidence, contact the alarm firm, get legal advice.
- Don’t: break in, retaliate, or give instructions to disable systems — those could be unlawful.
- Do: if you feel unsafe, seek emergency shelter options (family, friends, social services) and mention domestic violence hotlines if relevant.
