Article 17.1 of the Spanish Constitution provides that no one may be deprived of his or her liberty except in the "manner prescribed by law".
The law, more specifically article 503 of the Criminal Procedure Act, tells us that provisional detention may only be ordered when the following REQUIREMENTS are met
1.- On the crime: the existence of facts that have the characteristics of a crime punishable by a maximum of two years' imprisonment or more, or less if the person under investigation has a criminal record for an intentional crime.
2. On the person under investigation: sufficient grounds to accuse the person under investigation of committing the crime.
3. On the purpose: that through provisional detention one of the following purposes be pursued:
(a) Ensure the presence of the investigated person in the process when a risk of escape can be rationally inferred. In order to assess the existence of this risk, attention will be paid jointly to the nature of the act, the severity of the penalty, the family, work and economic situation of the person concerned, and the imminence of the oral proceedings. In any case, provisional detention shall be ordered when at least two requests have been made for it to be called and sought by any judicial body in the previous two years (in these cases the minimum sentence for the offence shall not be applicable).
(b) Avoiding the concealment, alteration or destruction of sources of evidence relevant to the prosecution in cases where there is a well-founded and concrete danger In assessing the existence of this danger, consideration shall be given to the ability of the person under investigation to gain access, either by himself or through a third party, to the sources of evidence or to influence other persons under investigation, witnesses or experts or those who might be so.
(c) Preventing the investigator from acting against the victim, especially when the victim is a partner (or ex-partner), family member or minor living with the victim (in these cases the minimum limit of the penalty for the crime will not be applicable).
(d) To avoid the risk of the person under investigation committing other criminal acts. In order to assess the existence of this risk, the circumstances of the act shall be taken into account, as well as the seriousness of the crimes that could be committed.
Punitive or anticipatory purposes are not constitutionally admissible. The primary purpose of provisional detention is linked to the need to ensure the normal course of the criminal proceedings in which the measure is taken, especially the need to ensure the presence of the accused at the trial and to avoid possible obstructions to its normal course.
In view of the foregoing, our doctrine has determined that there is a reinforced duty on the part of the judicial body to give reasons for the decision granting provisional detention, since only adequate reasons make the factual circumstances that were taken into account known and supervisable, so that this provisional measure can be revoked or modified at a later date.
Provisional detention shall last as long as is necessary to achieve any of these purposes and only for as long as these grounds remain, with a maximum period that varies depending on the maximum severity of the penalty for the offence under investigation: one year if the offence carries a penalty of imprisonment of three years or less, or two years if the penalty of imprisonment for the offence carries a penalty of more than three years, with the possibility of exceptional extensions of six months or two years, respectively.
In cases of conviction, and for the duration of the appeal, provisional detention may be extended up to a limit of half the sentence actually imposed in the sentence under appeal.
Where provisional detention has been agreed upon in order to avoid the concealment, alteration or destruction of evidence, its duration may not exceed six months.
Our Constitutional Court has established a doctrine that provisional detention must be applied within the parameters of the principle of exceptionality, linked to the fact that the principles of pro libertatis or in dubio pro libertatis govern criminal proceedings. Thus, the interpretation and application of the rules governing provisional detention "must be restrictive and in favour of the fundamental right that such rules restrict, which must lead to the choice and application, in cases of doubt, of the least restrictive rule of freedom".
Under the umbrella of the principle of exceptionality, pre-trial detention is prevented from being applied in cases where the intended purpose can be achieved by less burdensome alternative measures. This principle obliges the judge to ascertain whether the legitimate aim pursued can be achieved by means of an alternative measure.