Article 239 Spanish Criminal Code: false keys

Quick answerArticle 239 of the Spanish Criminal Code defines false keys for the purposes of robbery with force: picks and similar instruments, genuine keys lost by the owner or obtained by means constituting a criminal offence, and any other key not intended by the owner to open the lock in question. It treats cards, remote opening devices and any other technological instrument of similar effectiveness as keys.

This is a definitional provision and therefore one of constant application. Its reading decides whether a taking is classified as theft or as robbery with force, with the difference in penalty that entails, and it is the rule that brings the unauthorised use of bank cards at cash machines within robbery.

Also cited as: article 239 Spanish Criminal Code · art. 239 CP · Spanish Penal Code article 239 · artículo 239 del Código Penal.

Wording of the provision

The following shall be regarded as false keys:

1. Picks or other similar instruments.

2. Genuine keys lost by the owner or obtained by means constituting a criminal offence.

3. Any keys other than those intended by the owner to open the lock forced by the offender.

For the purposes of this Article, cards, whether magnetic or perforated, remote opening devices or instruments and any other technological instrument of similar effectiveness shall be regarded as keys.

Consolidated text published by the Spanish Official State Gazette, Organic Act 10/1995 of 23 November, the Criminal Code. Unofficial English rendering; the Spanish text is the authentic one.

Sentencing range. A definitional provision. It carries no penalty of its own: it delimits the concept of a false key whose use amounts to the force upon things in Article 238(4), punished under Article 240 or, where applicable, Article 241.

Key facts

Function To define the concept of a false key for the purposes of Article 238(4) and therefore of robbery with force.
Current wording It comes from Organic Act 5/2010 of 22 June, which introduced the technological equivalence in the closing paragraph.
Equivalent instruments Magnetic or perforated cards, remote opening devices and instruments, and any other technological instrument of similar effectiveness.
Sentencing consequence One to three years under Article 240, or two to five years in the situations covered by Article 241.
Boundaries With theft under Article 234, which requires no force, and with theft aggravated by breach of trust under Article 235.
Common application Use of another person’s bank card at a cash machine, use of keys obtained by domestic staff, and opening vehicles with electronic devices.

Elements and scope

  1. There must be a lock or closing mechanism that was forced or operated.
  2. The instrument used must fall within one of the three situations in the provision, or within the technological equivalence in the closing paragraph.
  3. The owner must not have intended that instrument to open the lock concerned.
  4. The use of the instrument must serve to reach the place where the property is kept, or to leave it.

Points of application

Supreme Court judgment 266/2024 of 18 March, Full Second Chamber. Taking keys that are not at the offender’s disposal, in order to open a strongbox surreptitiously, amounts to obtaining them by means constituting a criminal offence for the purposes of paragraph 2. What matters is not that the key was lost but that its owner never handed it over voluntarily for that use. The case concerned a domestic employee who exploited a relationship of trust.
The technological equivalence. The closing paragraph resolves cases involving cards and remote controls. Their unauthorised use to reach a cash machine, a garage or a vehicle amounts to force upon things, even though nothing is broken and no physical violence is used.
The test is not damage but unlawful access. The reason for treating this more seriously than theft lies not in damage to the mechanism but in the breach of the protective barrier the owner had put in place.

Defence strategy

Where the instrument came from. Classification turns on how the key or card was obtained. If the owner handed it over voluntarily for a use that covers what was done, there is no false key and the act falls, where appropriate, within misappropriation or theft.

Implied authority and the scope of the task. In relationships of trust, domestic service or care work, the scope of the task must be established. Prior authority to make purchases or run errands rules out the surreptitious character of the access.

Proof of use. The prosecution must establish that it was the accused who used the instrument. Recordings, the audit trail of the transactions and access logs are the natural ground for challenge.

Defence in this area

If you or your company are facing proceedings in this area, the firm provides defence and prosecution in Alicante and Madrid, with 24-hour assistance to detained persons.

Are you under investigation or facing charges in Spain? Société Juridique acts for foreign nationals throughout Spain, with offices in Alicante and Madrid and a 24-hour custody line. +34 669 30 21 13 or enquire online.

This page is provided for information only and does not constitute legal advice. The application of any provision depends on the circumstances of the case and requires review of the file by a lawyer. The English rendering of the legal text is unofficial.

Last reviewed: 21 September 2026.

Frequently asked questions

What counts as a false key under the Spanish Criminal Code?

Picks or other similar instruments, genuine keys lost by the owner or obtained by means constituting a criminal offence, and any other keys not intended by the owner to open the lock that was forced.

Is a bank card a false key?

For the purposes of this Article, yes. The closing paragraph treats cards, whether magnetic or perforated, remote opening devices and any other technological instrument of similar effectiveness as keys.

What penalty follows from using a false key?

Using a false key amounts to the force upon things in Article 238(4), so the act is punished as robbery with force: one to three years under Article 240, or two to five years where Article 241 applies.

Is it robbery to use a key I was given for something else?

It may be. The Full Second Chamber of the Supreme Court, in judgment 266/2024 of 18 March, treats as a false key one that the owner never handed over voluntarily for that use, even where the offender had lawful access to the premises.

Must the lock be damaged?

No. The reason for the aggravation is not damage to the mechanism but the breach of the protective barrier put in place by the owner.

Where can the official text be consulted?

In the consolidated version published by the Spanish Official State Gazette, which is the authentic text.

Logotipos-abogacia-scje
Paseo De La Castellana 216 8º 28046 Madrid
Alicante – Playa de San Juan Av. Ansaldo 31, local 16, 03540 Alicante
London: 20 Wenlock Road, N1 7GU, United Kingdom
Paris: 72 Faubourg St Honoré, 75008, France
info@societejuridique.com

Société de Conseil Juridique et Expert is a law firm with offices in Madrid, Alicante, London and Paris, specialising in criminal law, technology law and economic and corporate crime. We provide strategic guidance in complex criminal proceedings, intellectual property and technological resources for legal decision-making with advanced forensic analysis. Our multidisciplinary team combines legal experience, legal intelligence and personal attention to deliver effective solutions adapted to each case. Legal assistance available 24 hours a day and online consultations.

Copyright © 2026 Société de Conseil Juridique et Expert S.L.

EspanolEnglishFrancaisРусскийItalianoDeutsch
WhatsApp · Urgencias 24h