Provisional imprisonment may only be ordered by the competent judicial authority. During the preliminary proceedings or the summary, the Examining Magistrate may order it. Once the oral trial has begun, it will be the Criminal Judge or court that may order it. In the event of an appeal, the Court or Court that heard the case will continue to have jurisdiction.
Appearance : requirement of the accusatory and contradictory chinese overseas europe database principles , the request of the Public Prosecutor or of some accusing party is required for the judge to order imprisonment. If the judge considers that the conditions for adopting the measure exist, with the person under investigation at liberty, he may order it ex officio, but must convene the appropriate appearance within the following seventy-two hours. It is necessary that some accusing party requests the measure, otherwise the judge must revoke it and agree to the release of the alleged responsible party.
Article 505.4 LECrim : 4. The judge or court shall decide on the appropriateness or not of imprisonment or the imposition of bail. If neither of the parties requests them, the judge or court shall necessarily agree to the immediate release of the person under investigation or accused who is detained.

Following the appearance, a reasoned decision will be issued in the form of an order which, if it agrees to imprisonment, will state the reasons why the measure is considered necessary and proportionate. The interested party must be notified of this order in full so that he or she may challenge it.
Resources
Against the provisional imprisonment order, or the one that denies the one that had been requested, it is possible to lodge an appeal for reform , and a subsidiary appeal and directly an appeal, by means of a written document in which the reasons for the challenge will be expressed, article 507 LECrim . Being in the hands of a criminal lawyer is essential whether you want to appeal the order that agrees to provisional imprisonment or if it denies it.
Modification of the measure
Provisional imprisonment is subject to review, from the moment the reasons that gave rise to the provisional imprisonment order disappear, the judge must issue another resolution in the same form, ex officio, ordering the provisional imprisonment to be lifted or agreeing to a more beneficial measure.
Duration and extension
The length of pretrial detention has created problems. Article 504 of the Criminal Procedure Act regulates its duration. It must last as long as is essential and as long as the reasons justifying it persist.
Article 504.1 LECrim : 1. Provisional imprisonment shall last for the time essential to achieve any of the purposes set forth in the previous article and as long as the reasons that justified its adoption continue to exist.
The time limits are adapted to the circumstances of the specific case. The LECrim takes into account two criteria: the seriousness of the offence and the purpose of provisional imprisonment. These are absolute maximum time limits.
In the event of concealment, alteration or destruction of evidence sources, the term will be 6 months (article 504.3 LECrim); if there is a risk of flight, repeated offence or damage to the evidence sources, it may not exceed two years if the prison sentence is greater than 3 years. If the sentence is less than or equal to 3 years, it may not exceed one year.
Once a conviction has been handed down, if an appeal is filed, the sentence may be extended by a maximum of half of the sentence actually imposed.
When imprisonment is adopted to prevent escape or repetition of offences, the exceptional possibility of its extension is established if circumstances arise which make it foreseeable that the sentence cannot be handed down within the maximum time limits referred to; in such cases, imprisonment may be extended up to two years if the sentence assigned to the offence exceeds three years and up to six months if the sentence is equal to or less than three years , after hearing the affected party and the Public Prosecutor's Office, by means of an order (art. 504.3 LECrim).