Code of Alabama
Article 3 - Commitment.
Section 15-16-41 - Determination of Necessity for Hearing as to Involuntary Commitment of Defendant Found Not Guilty by Reason of Insanity; Subsequent Proceedings.

If a defendant in a criminal case is found not guilty by reason of insanity, the court shall forthwith determine whether the defendant should be held for a hearing on the issue of his involuntary commitment to the Alabama State Department of Mental Health. If the court determines that there is probable cause to believe that the defendant is mentally ill and as a consequence of such mental illness poses a real and present threat of substantial harm to himself or to others, the court shall order the defendant into the custody of the sheriff until a hearing can be held to determine whether the defendant shall be involuntarily committed. If the court does not make such a determination, then the defendant shall be forthwith released from custody.