Skip to content
Legal Analysis

Undercover Agents in Spain (Art. 282 bis LECrim): Requirements, Limits and Entrapment

September 5, 2026

Key Takeaways

  • Infiltration requires a reasoned decision and an investigation into organised crime (Art. 282 bis.1 and .4 LECrim)
  • The assumed identity is granted by the Ministry of the Interior for six renewable months
  • The immunity in Art. 282 bis.5 never covers provoking the offence
  • Every intrusion into fundamental rights needs its own judicial authorisation (Art. 282 bis.3)

Art. 282 bis LECrim allows the investigating judge, or the prosecutor reporting immediately to the judge, to authorise by reasoned decision that a Judicial Police officer act under an assumed identity in investigations into organised crime. The agent is exempt from liability for necessary and proportionate acts, but never for provoking the offence: where the criminal intent stems from their incitement, there is no prosecutable offence.

Need help with your case? Talk to a criminal defence lawyer at Alonso Sala.

Police infiltration is the investigation measure that departs furthest from the ordinary pattern: it does not observe from outside but places a State agent inside the organisation under investigation. That is why the LECrim subjects it to its own narrow regime in Art. 282 bis, and why its judicial control is one of the areas where the validity of a whole case is most often decided.

You are under investigation and an undercover agent took part

The first thing to grasp is that an undercover agent is neither an ordinary witness nor an informant. They are a Judicial Police officer authorised by a judicial decision — or by the prosecutor reporting immediately to the judge — to act under a false identity for a set period. Everything they do is tied to that authorisation: outside it, their conduct has no legal cover and the evidence obtained is open to challenge.

What an undercover agent is and who authorises one

Art. 282 bis.1 LECrim allows the competent investigating judge, or the Public Prosecutor reporting immediately to the judge, to authorise by reasoned decision — having regard to its necessity for the purposes of the investigation — that Judicial Police officers act under an assumed identity, acquire and transport the objects, proceeds and instruments of the offence and defer their seizure.

That authorisation has three consequences worth fixing. The assumed identity is granted by the Ministry of the Interior for six months, renewable for periods of equal length, and lets the agent take part in legal and social dealings under that name in everything connected with the specific investigation. The information obtained must be passed to whoever authorised the investigation as soon as possible. And that information must be brought into the proceedings in full, to be assessed by the court: a selection of what suits the prosecution is not allowed.

Alongside this figure, the law provides for controlled delivery under Art. 263 bis LECrim, which allows unlawful consignments to move under surveillance instead of being seized at once. They are separate measures with their own requirements, even though they often appear in the same investigation.

The threshold requirement: organised crime

Infiltration is not available for any offence. Art. 282 bis.1 reserves it for investigations "concerning activities typical of organised crime", and paragraph 4 defines that concept as a closed category: an association of three or more people to carry out, on a permanent or repeated basis, conduct aimed at committing one of the offences on a fixed list.

That list includes, among others, unlawful organ trafficking (Art. 156 bis CP), kidnapping (Arts. 164 to 166 CP), human trafficking (Art. 177 bis CP), prostitution offences (Arts. 187 to 189 CP), certain offences against property and the socio-economic order (Arts. 237, 243, 244, 248 and 301 CP), intellectual and industrial property offences (Arts. 270 to 277 CP), offences against workers' rights (Arts. 312 and 313 CP), offences against the rights of foreign nationals (Art. 318 bis CP), trafficking in endangered species (Arts. 332 and 334 CP), public health offences (Arts. 368 to 373 CP), counterfeiting of currency and payment instruments (Arts. 386 and 399 bis CP) and trafficking in or stockpiling of weapons, ammunition or explosives (Arts. 566 to 568 CP).

The defence consequence is direct: if the investigation does not meet both filters — a structure of three or more people with permanence or repetition, and a listed offence — the authorisation has no statutory basis.

Assumed identity, confidentiality and testimony at trial

The decision ordering the infiltration must record the agent's real name and the assumed identity to be used in the specific case. It is a confidential decision, kept outside the case file under proper security (Art. 282 bis.1, second paragraph).

At trial, Art. 282 bis.2 allows the agent to keep the false identity when testifying, provided this is ordered by a reasoned judicial decision, with the statutory regime for the protection of witnesses and experts applying. The same paragraph adds a rule that says a great deal about the nature of the measure: no officer may be compelled to act as an undercover agent.

The limits of the agent's conduct

Art. 282 bis.3 is categorical: where the investigative acts may affect fundamental rights, the agent must apply for the authorisations the Constitution and the law require. Going undercover does not in itself permit entering a home, intercepting communications or searching devices; each intrusion needs its own title, with the requirements set out in the article on phone and electronic interception.

As to liability, Art. 282 bis.5 declares the agent exempt from criminal liability for acts that are a necessary consequence of the investigation, on two cumulative conditions: that they are duly proportionate to its purpose and that they do not amount to provoking the offence. If prosecuting the agent for what they did is considered, the judge must first obtain a report from whoever granted the assumed identity.

Entrapment against lawful evidence gathering

This is the decisive distinction and the one most argued at trial. There is entrapment where no criminal intent existed and it arises in the person investigated because of the agent's own incitement: the act is then the product of a fiction created by the State, no protected interest is really harmed and no conviction is possible. The consequence is not only the acquittal of the person incited but the uselessness of all the evidence built on that incitement.

There is, by contrast, lawful evidence gathering where the criminal activity was already under way or the decision to offend was earlier and independent, and the police action merely uncovers, follows and documents it. The agent takes an opportunity that already existed; it does not create one.

The indicators examined to place a case on one side of the line or the other are concrete: whether the offer came from the agent or from the person investigated; whether there was insistence, pressure or disproportionate incentives; whether there were indications of criminal activity predating the contact; whether the person already had the means to offend; and whether the operation was documented from the outset or only once it produced a result.

The online undercover agent

Paragraphs 6 and 7 of Art. 282 bis govern the digital form. The investigating judge may authorise Judicial Police officers to act under an assumed identity in communications held in closed channels, in order to clarify one of the offences in paragraph 4 or any of those covered by Art. 588 ter a LECrim. With specific authorisation, the agent may themselves exchange or send files that are unlawful by reason of their content and analyse the results of the algorithms applied to identify them.

Paragraph 7 adds a notably wide power: in the course of an investigation using an undercover agent, the competent judge may authorise images to be obtained and conversations recorded at the planned meetings between the agent and the person investigated, even where they take place inside a home. As this is an intrusion into fundamental rights, the authorisation must be express, specific and reasoned.

A bill currently before Parliament

It is worth noting, without commenting on it, that a bill to amend the Criminal Procedure Law in order to strengthen the procedural safeguards applying to undercover agents is before the Spanish Parliament (file 122/000174, 15th legislature), at the stage of being taken into consideration. Until it is passed, the regime in force remains the current Art. 282 bis. This bill is not yet listed in our index of reforms in progress —which only covers those whose text is already published in the official gazette of the Cortes— but the status of the others can be followed in the index of criminal law reforms in progress.

What the defence reviews

  • The authorising decision. That it exists, that it is reasoned, that it identifies the offence investigated and that it predates the agent's activity.
  • The fit with Art. 282 bis.4. A structure of three or more people, permanence or repetition, and a listed offence: all three elements, not two.
  • The time limit. Six months from the grant of the assumed identity, with express renewals if the infiltration continues.
  • The completeness of what was filed. Paragraph 1 requires the information to be brought into the proceedings in full; partial disclosure, or disclosure of the incriminating part alone, can be challenged.
  • The additional authorisations. Every intrusion into fundamental rights needs its own order: without one, Art. 11.1 LOPJ comes into play.
  • The chronology of the incitement. Who proposed what and when, with the documents that prove it, in order to isolate any entrapment.

In cases involving a criminal organisation or group and in drug trafficking cases, infiltration is usually combined with interceptions and controlled deliveries, and defects in one measure contaminate the others. If an undercover agent appears in your case, the prudent step is to have a criminal defence lawyer examine the authorisation and the full chronology. You can contact us at +34 91 078 65 74.

Official text: article 282 bis of the Spanish Criminal Procedure Law (BOE)

Frequently asked questions

Which investigations can use an undercover agent?

Only those concerning activities typical of organised crime, defined in Art. 282 bis.4 LECrim as an association of three or more people to carry out, on a permanent or repeated basis, conduct aimed at committing one of the offences on a closed list (human trafficking, public health offences, arms trafficking, money laundering and certain property and economic offences, among others).

Can an undercover agent commit offences while infiltrated?

Art. 282 bis.5 LECrim exempts them from criminal liability for acts that are a necessary consequence of the investigation, provided they are duly proportionate to its purpose and do not amount to provoking the offence. Outside that perimeter they are liable like anyone else.

What is the difference between entrapment and lawful evidence gathering?

In entrapment the criminal idea arises in the person investigated because of the agent incitement and the act would not have occurred without it: there is no prosecutable offence. Where the criminal activity already existed or the decision predated the contact, the police action merely uncovers and documents it, which is lawful.

Can the agent testify under the false identity?

Yes, if so ordered by a reasoned judicial decision (Art. 282 bis.2 LECrim), with the statutory regime for the protection of witnesses and experts applying. The decision granting the assumed identity records the real name, is confidential and is kept outside the case file under proper security.

What is the online undercover agent?

The form set out in paragraphs 6 and 7 of Art. 282 bis LECrim: the judge authorises acting under an assumed identity in closed communication channels and, with specific authorisation, exchanging or sending files that are unlawful by reason of their content and analysing the results of the algorithms used to identify them.

Do you need criminal defence in this area?

We are criminal defence lawyers specialising in criminal organization & group. We act urgently to protect your rights.

View expertise

This page is for information purposes only and does not constitute legal advice: every case requires individual assessment. How this content is produced and verified: editorial policy.

Related Articles

View all

Before you act, speak to a criminal defence lawyer.

What you read here is just the beginning. Transform information into active defence by contacting our team of experts.