This case is one of three cases consolidated for purposes of appeal on certification from the court of appeals. The sole issue presented is whether a trial court has authority to vacate a Sex Crimes Act commitment for the purpose of sentencing the offender under the Criminal Code. 1 We conclude the trial court has no such authority.
Hans Gerd Machner (Machner) was convicted on July 26, 1978, of two counts of second-degree sexual assault contrary to sec. 940.225(2) (a), Stats. 1975. He was committed to the Winnebago Mental Health Institute pursuant to sec. 975.01, Stats. 1975, for a determination of his need for specialized treatment as a sex deviate. The Department of Health and Social Services (department) recommended such treatment, and after waiving his right to contest the department’s recommendations, Machner was committed by the court to Central State Hospital on September 28, 1978, pursuant to sec. 975.06, Stats. 1975. On several occasions between October, 1978, and July, 1979, thе Central State Hospital staff reviewed Machner’s case and on July 3, 1979, determined that Machner was not sexually deviated and was not a proper candidate for treatment in the sex crimes program. Accordingly, the director of Centrаl State Hospital recommended that Machner be transferred to Waupun Correctional Institution. Machner *81 filed with the committing court a petition for relief challenging his transfer and requesting a restraining order preventing the transfer from taking plаce. On July 12, 1979, the department transferred Machner to Waupun.
On September 25, 1979, the circuit court issued a memorandum decision finding that the defendant had a “colorable” claim and ordered the department to show cause why and upon what authority it made the transfer. A hearing on the matter was held on October 26, 1979, at which Dr. Lawrence Kane, chief psychologist at Waupun Correctional Institution, testified in essence that Machner was transferred to Waupun because, while the deрartment believed him to be dangerous, he was not a sex deviate and consequently was not in need of specialized treatment under the sex crimes program. On the strength of this hearing the circuit court concluded that the original commitment following Machner’s conviction was in error, based as it was upon an erroneous initial determination by the department relative to Machner’s need for specialized treatment, and in a memorandum decision and order dated Novembеr 1, 1979, vacated Machner’s original commitment to the department and remanded him to the court for sentencing. The state appealed the court’s order, and we accepted certification of this and two other cases presenting the same issue.
Initially we observe that this court consistently has recognized, based upon the separation of powers doctrine, that it is the legislative province to prescribe the punishment for a particular crime and the judicial province to impose that punishment.
“[T]rial courts have broad discretionary power to deal with individual cases on their merits. These powers are as broad and inclusive as in the opinion of the legislature was consistent with sound public policy. It is the function of the legislature to prescribe the penalty and *82 the manner of its enforcement; the function of the court to impose the penalty; while it is the function of the executive to grant paroles and pardons.”
Drewniak v. State ex rel. Jacquest,
The trial сourt was of the opinion that its action in this case was within the scope of authority recognized by this court in
Hayes v. State,
We do not think the rule of
Hayes
is applicable. Cases applying
Hayes
indicate that a court may correct errors which had resulted in invalid sentences,
see, State v.
North,
Any person convicted of certain sex-related offenses must be committed by the trial court to the department for a presentenee social, physical, and mental examination to determine if the person is an appropriate candidate for treatment. Sec. 975.01, Stats. 1975. If the department recommends specialized treatment, the trial court must order а hearing on this issue unless expressly waived, to be held before a twelve-person jury, unless
*84
a six-person jury is requested. Sec. 975.06(1) Stats. 1975. If the jury finds the person to be in need of specialized treatment, the trial court must commit the person to the depаrtment but may stay the execution of the commitment and place the offender on a conditioned probation. Sec. 975.06(2), Stats. 1975. Only if the department does not recommend specialized treatment in the first instance, or if the jury finds the offender nоt to be in need of specialized treatment, may the trial court sentence the offender according to the provisions of Chapter 978. Secs. 975.05, 975.06(4), Stats. 1975. Once an offender is committed, the trial court continues to play a role in the сommitment. Under sec. 975.09, Stats. 1975, as we recently outlined in
State v. Hanson,
In other cases where we have been called upon to consider a trial court’s action under the Sex Crimes Act, we have narrowly construed the court’s authority within statutorily authorized limits. For example, in
State ex rel. Copas v. Burke,
We understand the trial court’s dilemma, since it is clear that Chapter 975 did not provide for the situation which occurred here — an error in the initial departmеntal evaluation giving rise to a commitment. Obviously, the court was reluctant to permit the offender to continue under the Chapter 975 commitment when the *86 department had now concluded he was not a sex deviate, yet understandably the court wаs unwilling’ to discharge him, since he was still considered to be dangerous and in need of confinement. Despite this concern, and despite the fact that we do not view the court’s action as contrary to public policy, we are constrаined to follow the terms of the Sex Crimes Act. We conclude that the trial court has no authority to vacate a commitment lawfully executed pursuant to the terms of Chapter 975 and that the order of the trial court purporting to do so is void and of no effect.
The parties agree with our analysis up to this point. However, the state contends that Machner is still committed as he has been all along, while Machner argues that the court’s order vacating the commitment should be viewеd as an order of discharge under sec. 975.09, Stats. 1975, and he should be given full liberty. We cannot treat the trial court’s order as one for discharge under sec. 975.09, Stats. 1975, since the matter was initially brought before the court not upon a sec. 975.09 petition for disсharge following a departmental failure to conduct a periodic review, but rather upon Machner’s petition challenging the department’s authority to transfer him to Waupun. Quite clearly the predicate for ordering Machner’s discharge from commitment has not been established. Accordingly, we conclude that Mach-ner’s commitment to the department continues in effect. He is not recommitted by virtue of this decision; he simply continues under the control of the depаrtment pursuant to his original commitment.
By the Court. — The order of the circuit court is vacated and the cause is remanded to the circuit court with instructions to dismiss the petition.
Notes
The Sex Crimes Act was repealed by Chapter 117, Laws of 1979, effective July 1, 1980, and no cоmmitments were made after that date. Machner was committed under Chapter 975, Stats., 1975, and as a consequence our analysis of the case is in terms of that chapter. The repeal legislation created Sec. 975.17, Stats., which gives any committed person the option to petition the committing court for resentencing under Chapter 978. (We note that the term “resentencing” is a misnomer, since a sex crime commitment is not a sentence.) That section does not affect this ease inasmuch as Machner is not seeking to be resenteneed. For a discussion of the repeal of the Sex Crimes Act, see, Comment, Repeal of the Wisconsin Sex Crimes Act, 1980 Wis. L. Rev. 941.
