Tap any paragraph to write a margin note. Your notes collect in the Desk below the text and file under cases with @. The side-by-side margin rail opens on a larger screen.

Code · California · Penal Code

§ 4007

682 words·~3 min read·/ca/penal-code/4007

A research copy — for the controlling text, always check the official state or federal source. Not legal advice.

When there is no jail in the county, or when the jail becomes unfit or unsafe for the confinement of prisoners, the judge of the superior court may, by a written order filed with the clerk of the court, designate the jail of a contiguous county for the confinement of any prisoner of his or her county, and may at any time modify or vacate the order.
When there are reasonable grounds to believe that a prisoner may be forcibly removed from a county jail, the sheriff may remove the prisoner to any California state prison for safekeeping and it is the duty of the warden of the prison to accept and detain the prisoner in his or her custody until his or her removal is ordered by the superior court of the county from which he or she was delivered. Immediately upon receiving the prisoner the warden shall advise the Director of Corrections of that fact in writing.
When a county prisoner requires medical treatment necessitating hospitalization which cannot be provided at the county jail or county hospital because of lack of adequate detention facilities, and when the prisoner also presents a serious custodial problem because of his or her past or present behavior, the judge of the superior court may, on the request of the county sheriff and with the consent of the Director of Corrections, designate by written order the nearest state prison or correctional facility which would be able to provide the necessary medical treatment and secure confinement of the prisoner.
The written order of the judge shall be filed with the clerk of the court. The court shall immediately calendar the matter for a hearing to determine whether the order shall continue or be rescinded. The hearing shall be held within 48 hours of the initial order or the next judicial day, whichever occurs later. The prisoner shall not be transferred to the state prison or correctional facility prior to the hearing, except upon a determination by the physician responsible for the prisoner’s health care that a medical emergency exists which requires the transfer of the prisoner to the state prison or correctional facility prior to the hearing.
The prisoner shall be entitled to be present at the hearing and to be represented by counsel. The prisoner may waive his or her right to this hearing in writing at any time. If the prisoner waives his or her right to the hearing, the county sheriff shall notify the prisoner’s attorney of the transfer within 48 hours, or the next business day, whichever is later. The court may modify or vacate the order at any time.
The rate of compensation for the prisoner’s medical treatment and confinement within a California state prison or correctional facility shall be established by the Department of Corrections, and shall be charged against the county making the request.
When there are reasonable grounds to believe that there is a prisoner in a county jail who is likely to be a threat to other persons in the facility or who is likely to cause substantial damage to the facility, the judge of the superior court may, on the request of the county sheriff and with the consent of the Director of Corrections, designate by written order the nearest state prison or correctional facility which would be able to secure confinement of the prisoner, subject to space available.
The written order of the judge must be filed with the clerk of the court. The court shall immediately calendar the matter for a hearing to determine whether the order shall continue or be rescinded. The hearing shall be held within 48 hours of the initial order or the next judicial day, whichever occurs later. The prisoner shall be entitled to be present at the hearing and to be represented by counsel. The court may modify or vacate that order at any time. The rate of compensation for the prisoner’s confinement within a California state prison or correctional facility shall be established by the Department of Corrections and shall be charged against the county making the request.
★   the supreme law of the land   ★
Don't Tread on Me
E Pluribus Unum — out of many, one

"If you don't know your rights, you don't have any."

Marginalia · a citizen's law index
A research desk, not legal advice. Always read the cited source before relying on a summary.
Questions or an issue? support@self-law.org
disclaimerMarginalia is a research index, not a law firm. Nothing on this site is legal, tax, or financial advice and no attorney–client relationship is formed by using it. Statutes, regulations, and case law change; summaries, search results, AI output, and member posts may be incomplete, out of date, or wrong. Any interpretation drawn from material on this site should be validated by a licensed attorney in your jurisdiction before you act on it.