
101 Wis.2d 79 (1981)
303 N.W.2d 633
STATE of Wisconsin, Plaintiff-Appellant and Cross-Respondent,
v.
Hans Gerd MACHNER, Defendant-Respondent and Cross-Appellant.
No. 79-1939-CR.
Supreme Court of Wisconsin.
Argued March 3, 1981.
Decided March 31, 1981.
For the appellant the cause was argued by Pamela Magee-Heilprin, assistant attorney general, with whom on the briefs was Bronson C. La Follette, attorney general.
For the respondent there was a brief and oral argument by Louis B. Butler, Jr., assistant state public defender.
On certification from Court of Appeals.
*80 WILLIAM G. CALLOW, J.
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, the 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 Central 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 place. 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 department 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 November 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, 239 Wis. 475, 488, 1 N.W.2d 899 (1942). See also: State v. Sittig, 75 Wis. 2d 497, 499, 249 N.W.2d 770 (1977); State v. City of Monona, 63 Wis.2d 67, 72, 216 N.W.2d 230 (1974); State v. Duffy, 54 Wis.2d 61, 66-67, 194 N.W.2d 624 (1972); State ex rel. Schulter v. Roraff, 39 Wis.2d 342, 355, 159 N.W.2d 25 (1968). In Chapter 975, Stats. 1975, the legislature clearly outlined the consequences of certain sex crimes convictions: an offender either could be committed, as was Machner, pursuant to sec. 975.06, or sentenced in accordance with Chapter 973. In this case we are not called upon to focus on that initial choice but whether, once made, the trial court has the authority to vacate it for the purpose of pursuing the other alternative. Nonetheless, we are guided by the same separation of powers principle, which leads us to conclude that, if such authority exists in the trial court, it must derive from the statutes, for the trial court has no inherent authority to vacate a sex crimes commitment.
The trial court was of the opinion that its action in this case was within the scope of authority recognized by this court in Hayes v. State, 46 Wis.2d 93, 175 N.W.2d 625 (1970), wherein we held that a trial court had the inherent authority to modify a sentence after its commencement provided the matter was brought before the court within the time allowed for such actions. Subsequent decisions clarified the regulatory nature of the time limitation in Hayes and indicated that the court's inherent authority to modify a sentence may be exercised as a matter of discretion even beyond the time limitation period as long as the decision is based upon additional factors as opposed to mere reflection. See, e.g., Jones (Hollis) v. State, 70 Wis.2d 62, 72, 233 N.W. *83 2d 441 (1975); State v. Foellmi, 57 Wis.2d 572, 581-82, 205 N.W.2d 144 (1973).
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, 91 Wis.2d 507, 511, 283 N.W.2d 457 (Ct. App. 1979); Cresci v. State, 89 Wis.2d 495, 504, 278 N.W.2d 850 (1979) (order modifying sentence reversed on other grounds), or exercise sentencing discretion anew in light of factors not known or overlooked at the time of the imposed sentencing. See, e.g.: Kutchera v. State, 69 Wis.2d 534, 553, 230 N.W.2d 750 (1975). In this case Machner's commitment was not a sentence, nor, technically, was it an error by the trial court. Sec. 975.06(2), Stats. 1975, clearly leaves the court with no discretion but to commit once an offender has been determined to need specialized treatment. Upon the department's recommendation, once Machner waived any right to contest it, the court had to commit him to departmental control. It was a valid commitment. Moreover, it seems clear that under Hayes a trial court's latitude in modifying sentences generally extends only to things the court in the exercise of sentencing discretion could have done originally. Here the trial court could not have sentenced Machner originally as that option was foreclosed by the department's recommendation. Thus we must turn to Chapter 975 to determine whether authority to vacate a commitment is to be found there.
Any person convicted of certain sex-related offenses must be committed by the trial court to the department for a presentence 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 a 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 department 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 not to be in need of specialized treatment, may the trial court sentence the offender according to the provisions of Chapter 973. Secs. 975.05, 975.06(4), Stats. 1975. Once an offender is committed, the trial court continues to play a role in the commitment. Under sec. 975.09, Stats. 1975, as we recently outlined in State v. Hanson, 100 Wis.2d 549, 302 N.W.2d 452 (1981), there must be a hearing in the trial court if the department fails to conduct the required periodic review. If within two years of the initial commitment of one convicted of a felony the department determines the committee is entitled to discharge, such discharge shall not occur without court approval. Sec. 975.11, Stats. 1975. Under secs. 975.13 and 975.14, Stats. 1975, the committing court must review a departmental order to continue control of a committee beyond the maximum term of his confinement, and under sec. 975.15, Stats. 1975, it must review such continuation of control orders every five years thereafter. These are the only sections in Chapter 975, Stats. 1975, which authorize trial court action, and as it can clearly be seen, the authority to vacate an initial commitment is not among them.
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, 28 Wis.2d 188, 136 N.W.2d 778 (1965), which arose under former Chapter 959, *85 Stats., following a recommendation by the Department of Public Welfare that the offender was in need of specialized treatment, the trial court placed the offender on probation but also sentenced him to three consecutive terms for the offense and stayed their execution. On revocation of probation the offender was committed to the department, and the commitment was challenged on the ground that the trial court had no authority to commit the offender once having sentenced him. We upheld the commitment but held that the trial court had no authority to sentence the offender, since "[a] person for whom the presentence report of the department recommends treatment cannot be sentenced to punitive punishment but must be either committed to the department for treatment or placed on probation with treatment." Id. at 193-94. This position was reiterated in State v. Sorenson, 31 Wis.2d 368, 371, 142 N.W.2d 785 (1966), and again in Mitchell v. State, 69 Wis.2d 695, 701, 230 N.W.2d 884 (1975). Such narrow circumscription of trial court authority comports with our view of trial court authority in matters of probation, State v. Gloudemans, 73 Wis.2d 514, 243 N.W.2d 220 (1976), and sentencing, Guyton v. State, 69 Wis.2d 663, 230 N.W.2d 726 (1975); Drinkwater v. State, 69 Wis.2d 60, 230 N.W.2d 126 (1975); State v. Foellmi, supra; State v. Bagnall, 61 Wis.2d 297, 212 N.W.2d 122 (1973); Goyer v. State, 26 Wis.2d 244, 131 N.W.2d 888 (1965); State ex rel. Reynolds v. County Court, 11 Wis.2d 512, 105 N.W.2d 812 (1960).
[1]
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 departmental 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 was 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 constrained 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.
[2]
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 viewed 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 discharge 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 Machner'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 department 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
[1]  The Sex Crimes Act was repealed by Chapter 117, Laws of 1979, effective July 1, 1980, and no commitments 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 973. (We note that the term "resentencing" is a misnomer, since a sex crime commitment is not a sentence.) That section does not affect this case inasmuch as Machner is not seeking to be resentenced. 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.
