This is an appeal from the granting of a writ of habeas corpus by the Circuit Court of Yankton County, which ordered the release of respondent from the Human Services Center, Yankton, South Dakota. We affirm.
Respondent has been a patient at the Human Services Center nearly continuously since May, 1964, when he was admitted on a voluntary basis. He was discharged in July, 1964, but was re-admitted in March, 1965.
In 1974 a judge of the First Judicial Circuit Court decided in the unreported case of Schneider v. Radack, Yankton County, CIV. 74-50, that many patients had not been properly committed to the Human Services Center. Presumably as the result of the decision in Schneider, a petition was filed on August 9, 1974, seeking the emergency hospitalization and treatment of respondent. Pursuant to a hearing he was ordered so committed on August 10, 1974.
*596On November 9, 1974, a ninety-day review of respondent’s commitment was held pursuant to what was then codified as SDCL 27-7A-17 (now SDCL 27A-10-11). Respondent’s commitment was extended for an additional ninety days on February 1, 1975. Subsequently, on May 10, 1975, an additional ninety-day extension of commitment was ordered.
On July 28, 1975, a petition for commitment of respondent was filed with the Yankton County Board of Mental Illness, and pursuant to a hearing the Board did on August 8,1975, enter findings and an order committing respondent to the Human Services Center for one year. A ninety-day review of this commitment order was held on November 6, 1975, and respondent’s latest commitment was continued. On July 26,1976, an eleven-month rehearing regarding the commitment was held pursuant to SDCL 27A-12-17. Respondent was again recommitted to the Human Services Center on August 6, 1976.
In 1977 the South Dakota Legislature amended SDCL 27A-12-17 to provide for a rehearing every two years after the first eleven-month rehearing. Presumably pursuant to said statute, respondent was given, on August 1, 1978, a notice of a ninety-day review. Present counsel was appointed to represent him, and as the result of a hearing held on August 4, 1978, the Yankton County Board of Mental Illness ordered respondent to remain subject to the order of commitment previously entered against him. It is this latter order which is the subject of this action.
Respondent argued at the habeas corpus hearing that the Board of Mental Illness had failed to comply with the requirements of SDCL 27A-12-17 and that as a result the Board was without jurisdiction to recommit respondent to the Human Services Center. The trial court agreed, as do we.
ISSUE PRESENTED
There is but one issue before us: Were the provisions of SDCL 27A-12-17 complied with by the Board in the recommitment in August 1978?
DECISION
SDCL 27A-12-17 provides:
If a patient remains in the center or a community mental health center for eleven months and the administrator of the facility determines that the patient still requires treatment, the administrator shall petition the county board of mental illness wherein the facility is located and the county board of mental illness of the patient’s county of residence twenty days prior to the three hundred and sixty-fifth day for a rehearing. If the county board in the patient’s county of residence wishes to conduct the rehearing, it shall notify the administrator and the Yankton county board ten days prior to the date set for the rehearing in the petition. If such notification is timely given, the rehearing shall be conducted by the county board in the patient’s county of residence. Otherwise, the rehearing shall be conducted by the county board in the county where the facility is located. The chairman of the county board shall thereupon conduct a hearing within twenty days of the receipt of the petition. The procedure utilized in the original hearing as provided in chapter 27A-9, including notice and right to an attorney shall be followed in the rehearing.
If the administrator fails or refuses to petition the county board for a rehearing, the patient shall be released on the three hundred and sixty-fifth day of treatment.
The review after ninety days and the rehearing after eleven months shall be conducted during the first year of com- . mitment, and the rehearing shall be conducted every two years thereafter.
The Legislature required in the above-cited statute that the rehearings must be conducted under the procedures set forth in SDCL Chapter 27A-9 relating to commitment and board-ordered treatment of mentally ill persons. This chapter requires, among other things, the filing of a petition for commitment, an investigation and report by the state’s attorney as to *597whether or not probable cause exists that the person is mentally ill (SDCL 27A-9-1), a certificate by a qualified mental health professional (SDCL 27A-9-3), five days’ notice of hearing (SDCL 27A-9-6), and assigned counsel (SDCL 27A-9-8).
The record is clear, and it was admitted by appellant’s counsel at oral argument, that no petition was filed, that no probable cause investigation or report was made by the state’s attorney, and that there was only two days’ notice of hearing.
It is therefore abundantly clear that for reasons which have not been explained and which are not now material, the procedures mandated by the Legislature have not been complied with. Accordingly, the Board had no jurisdiction to enter the order it did on August 10, 1978.1
We are advised that there are at least forty-six other patients at the Human Services Center whose recommitment orders are similarly defective. We do not know the names, backgrounds or diagnoses of these patients.2 We do know with respect to respondent, however, that consistently throughout the commitment proceedings since 1964 he has been diagnosed as a schizophrenic because of delusional thought patterns. The psychiatrists have consistently been of the opinion that respondent is not a danger to himself or to others except for the possibility of neglecting his own personal needs. Inpatient hospitalization has been consistently recommended by the psychiatrists, however.
Recognizing the fact that our decision will have the effect of granting the immediate release of respondent and others similarly situated, we remind counsel that the judgment that will be entered pursuant to this decision will not take effect until the settled record in this case has been remitted, which at the earliest will be twenty days from and after the date of this opinion. SDCL 15-30-4 and 15-30-11. This statutory delay would appear to afford appellants sufficient time to establish priority among the cases and to either institute commitment proceedings under SDCL 27A-10 or return the patients to their home counties for recommitment under SDCL 27A-9.
The order appealed from is affirmed, and this court’s order staying the execution of the trial court’s order is dissolved.
All the Justices concur.
MILLER, Circuit Judge, sitting for MORGAN, J., disqualified.. The Board in at least two cases subsequent to the instant action has recognized the procedural errors and has concluded that it had no jurisdiction and as a result ordered immediate release of patients.
. Although respondent’s motion for class action certification was denied by the circuit court, appellants stipulated that they would be bound by the decision in respondent’s case with respect to these forty-six patients.