How long does a restraining order last? Interim measure and sentence

The duration depends on whether it is an interim measure or a sentence imposed in a judgment. We explain the legal time limits, how they are calculated and when they end.
Celeste Pérez Bleda, criminal lawyer in Alicante
Celeste Pérez Bleda
Criminal lawyer · Bar No. 7301 ICALI

Updated: 16 November 2026

Reloj de arena junto a un calendario, cuánto dura una orden de alejamiento
Quick answer

It depends on whether it is an interim measure or a sentence. As an interim measure (arts. 544 bis and 544 ter of the Criminal Procedure Act, LECrim) it has no fixed time limit: it lasts as long as the court order says, as a rule until the proceedings end. As a sentence (arts. 48 and 57 of the Criminal Code, CP), the duration is set by the judgment: up to 10 years for serious offences, up to 5 for less serious offences and up to 6 months for minor offences; if there is a prison sentence, between 1 and 10 years longer (serious) or between 1 and 5 years longer (less serious) than the prison term.

How long a restraining order lasts is one of the questions we are asked most often, both by victims who want to know how long they are protected and by accused men who need to organise their lives, their work or their relationship with their children. There is no single answer: it depends on the type of order and the stage the proceedings have reached.

Here we explain how the duration is worked out in each case. If you need help with a specific order, see our service as a lawyer for restraining orders in gender violence cases.

Interim measure or sentence: the key to the duration

The first step is to look at the decision you have been served with:

  • A court order (auto) made during the investigation (at the duty court or the Gender Violence Section, Sección de Violencia sobre la Mujer): this is an interim measure, sometimes part of a protection order. Its purpose is to protect the victim while the case is investigated.
  • A conviction: this is a sentence. For offences committed against a partner, former partner or the relatives listed in art. 173.2 CP, the ban on approaching the victim is imposed in all cases (art. 57.2 CP).

How long a restraining order lasts as an interim measure

The law sets no maximum period for an interim restraining order. The judge decides its content and duration in the court order (art. 544 ter.4 LECrim) and must give reasons showing that it is proportionate and necessary (art. 68 of Organic Act 1/2004 on gender violence, Ley Orgánica 1/2004). In practice, it stays in place while the proceedings last and the risk that justified it persists.

This means it can last anything from a few days, if the case is resolved in a fast-track trial, to many months if a full preliminary investigation (diligencias previas) is under way. During that time, either party can ask for it to be varied or lifted, and the judge can adjust it if circumstances change (art. 544 bis LECrim). We explain how in how to lift a restraining order.

Civil measures have a different time limit

If the protection order includes civil measures (the family home, custody, contact or maintenance), these last thirty days. If the victim files family proceedings within that period, they remain in force for a further thirty days from the date of filing, and the competent family judge must confirm, vary or set them aside (art. 544 ter.7 LECrim). The criminal restraining order, by contrast, does not lapse after thirty days.

What happens to the interim measure when the proceedings end

How the case ends What happens to the interim restraining order
Dismissal (sobreseimiento) The basis for the measure disappears and it must be set aside. It remains in force until you are served with the decision
Acquittal The measure lapses. If the judgment is appealed, check what it says about the measures
Conviction The restraining order is imposed as a sentence. Interim measures can be kept in place after judgment and during appeals, if the judgment so states (art. 69 Organic Act 1/2004)

Important: a restraining order does not come to an end because the victim and the accused start talking again or move back in together. Until there is a court decision setting it aside, approaching her is the offence of breach (quebrantamiento), punishable by six months to one year in prison (art. 468.2 CP), even if she agrees.

How long a restraining order lasts as a sentence

When the restraining order is imposed in a judgment, the judge sets its duration within the limits of article 57 of the Criminal Code, which depend on how serious the offence is:

Type of offence Without a prison sentence With a prison sentence
Serious Up to 10 years Between 1 and 10 years longer than the prison term
Less serious Up to 5 years Between 1 and 5 years longer than the prison term
Minor Up to 6 months (art. 57.3) —

Where there is a prison sentence, both sentences are served at the same time (art. 57.1 CP). So the restraining order is still in force when the convicted person leaves prison and continues for the additional period set by the judgment.

A common example is the offence of partner abuse under article 153 CP. It is a less serious offence, so the restraining order can last up to five years if the sentence is community service, or between one and five years longer than the prison term if prison is imposed. We explain this in article 153 of the Criminal Code and its penalties.

What the sentence includes

The ban on approaching prevents the person from going near the victim wherever she is, her home, her workplace and other places she frequents (art. 48.2 CP). The ban on communicating prevents written, verbal or visual contact by any means, including messages and social media (art. 48.3 CP). While the ban on approaching is being served, any contact arrangements with the children set in a civil judgment are suspended.

When it starts to run and what is deducted

  1. The judgment must be final. While it is under appeal, the interim measures that have been kept in place apply.
  2. Calculation of the sentence (liquidación de condena). The body enforcing the judgment, normally the Criminal Section (Sección de lo Penal), calculates the start and end dates and requires the convicted person to comply.
  3. Credit for the interim period. The time the convicted person has already spent subject to the ban as an interim measure is deducted from the sentence (art. 58.4 CP).

That is why it is important to keep the court order that imposed the interim measure and the date on which it was served: the final calculation depends on it.

What happens when the sentence has been served

Once the period has ended, the ban is extinguished and contact is no longer an offence. Any contact arrangements that were suspended come back into effect, although if circumstances have changed they may need to be reviewed in family proceedings. The criminal record, however, remains until it is cleared. Before that date, the only way to set aside a final sentence is a pardon (indulto).

If the order is breached before it ends, the convicted person commits a new offence of breach; we cover this in breach of a restraining order: penalties and defence.

How long restraining orders last in Alicante

In the Alicante judicial district, interim restraining orders are made by the Gender Violence Section of the Court of First Instance (Tribunal de Instancia), at Avenida Aguilera, 53, or by the duty court. Sentences imposed in a final judgment are enforced by the Criminal Section, which calculates the sentence. Every protection order is entered in the Central Register for the Protection of Victims of Domestic and Gender Violence (Registro Central para la Protección de las Víctimas de la Violencia Doméstica y de Género) (art. 544 ter.10 LECrim).

At our firm we check the sentence calculation so that the interim period is credited correctly, apply for variation when it is justified and, when we act for the victim, ask for the measures to be kept in place while the risk persists. Celeste Pérez Bleda has more than 20 years’ experience in criminal law.

Every case is different. If you would like a lawyer specialising in gender violence in Alicante to look at yours, get in touch: we reply the same day and can assist you in your own language.

Frequently asked questions

How long does a provisional restraining order last?

The law sets no maximum period. It lasts as long as the court order states, while it is necessary and, as a rule, until the proceedings end in dismissal, acquittal or conviction. You can ask for it to be varied or lifted at any time if circumstances change, but until the judge agrees it remains in force and must be complied with.

How many years of restraining order are imposed for partner abuse?

Abuse under article 153 CP is a less serious offence, so the restraining order can last up to five years if there is no prison sentence. If prison is imposed, the restraining order must last between one and five years longer than the prison term, and both sentences are served at the same time. The judge sets the exact duration in the judgment according to the seriousness of the offence and the risk.

Is the time spent under the interim order deducted from the sentence?

Yes. Article 58.4 of the Criminal Code provides that deprivations of rights imposed as interim measures are credited towards the sentence. The time you were subject to the ban on approaching during the proceedings is deducted when the enforcing body calculates the sentence.

Does a restraining order expire after 30 days?

No. What lasts thirty days are the civil measures in the protection order (the home, custody, contact or maintenance), which can be extended for another thirty if family proceedings are filed. The criminal restraining order remains in place for as long as the judge decides or, if it is a sentence, for the period set in the judgment.

If the complaint is dismissed, is the restraining order lifted?

Yes, dismissal removes the basis for the interim measure and it must be set aside. But do not act until you have been served with the decision: until then, the order remains in force. If the victim appeals the dismissal, check with your lawyer what has been decided about the measures.

If you want to know how long a restraining order protects you, or how long you must comply with it, we review your court decision and explain it to you with specific dates. Our team will assist you in English. There is more information on restraining orders in gender violence cases and on the defence in cases of breach of the order, or you can message us on WhatsApp at 607 449 491, 24 hours a day: we will reply straight away.

Contents

Are you involved in criminal proceedings?

We explain your options and the next steps. Urgent assistance 24 hours a day.

Do you need a criminal lawyer?

We are available 24 hours a day. Your first case assessment is confidential.
Can I help you?