[1a] By this proceeding in habeas corpus we adjudicate the power of the Adult Authority to "correct" an erroneous sentence imposed by a trial court. As will appear, we hold that the Adult Authority is not vested with such power and that any attempted exercise thereof is in excess of its jurisdiction.1
 Petitioner was convicted of second degree robbery on April 5, 1962, and was sentenced to prison for the term prescribed by law (Pen. Code, § 213 ["not less than one year"]). He was confined in the California Men's Colony, San Luis Obispo County, but escaped from that facility on September 14, 1962. Nine days later his abortive freedom terminated and he was returned to prison. On November 19, 1962, he pleaded guilty in the San Luis Obispo Superior Court to a charge of escape. (Pen. Code, § 4530.) In rendering judgment the court ordered that the sentence on the escape charge ("not less than one year") be served concurrently with the prior robbery sentence. This order was erroneous and beyond the power of the court, for at the relevant time Penal Code section 4530 expressly declared that the "term of imprisonment" for escape was "to commence from the time [the prisoner] would otherwise have been discharged" on the prior sentence.2
The People took no steps to obtain a judicial modification of this void portion of the judgment; instead, pursuant to what appears to be its practice in this regard, the Adult Authority itself made the "correction" in a routine administrative manner. Thus the Attorney General admits in his return that "in recording petitioner's sentences" the Department of Corrections "set forth that said sentence [for escape] was to run consecutively to that imposed [for robbery]." On the copy of the abstract of the escape judgment in the files of the Department of Corrections, adjacent to the trial court's order that the sentence be concurrent, there appears a handwritten notation stating that "this term is to run CS WPT." We are informed that in corrections parlance the abbreviation means "Consecutive Sentence With Prior Term."
In compliance with this "corrected" sentence the Adult Authority refused in July 1964 to fix petitioner's sentences or to consider his application for parole, on the ground that the minimum time to be served on consecutive sentences (Pen. Code, § 3043 (two years)) had not yet elapsed.3 Upon this refusal petitioner filed the present application for habeas corpus; his action was timely, for he alleges it was not until the July 1964 hearing that he learned of the Adult Authority's "correction" of his sentence. In June 1965, while the application for habeas corpus was pending in the courts, the Adult Authority held a second annual hearing in petitioner's case and fixed his robbery sentence at three years and his escape sentence at two years consecutive to the robbery term. Petitioner was granted parole effective September 1, 1965, and his present discharge date is April 15, 1967.
The question to be determined is whether the Adult Authority has the power to "correct" an erroneous sentence of a trial court.
The guiding principles are clear.  Upon conviction it is the duty of the court to pass sentence on the defendant and impose the punishment prescribed. (Pen. Code, § 12.)  Under our indeterminate sentence law, of course, the Adult Authority is empowered to determine as an administrative matter "what length of time" a person sentenced to prison shall serve (Pen. Code, § 3020; see also Pen. Code, §§ 3021-3025, 5077); but the actual imposition of that sentence for the term prescribed by law remains a judicial function which can be performed only by a court. (In re Lee (1918) 177 Cal. 690, 693 [171 P. 958]; People v. Sama (1922) 189 Cal. 153, 156-157 [207 P. 893]; In re Bertrand (1943) 61 Cal.App.2d 183, 187 [142 P.2d 351].)  The Adult Authority's determination of the length of term is no part of the imposition of sentence, and "if it were so regarded it would be the exercise of a judicial function by an executive board, and void under section 1, article III, of the Constitution [i.e., guaranteeing the separation of powers]." (People v. Sama (1922) supra, 189 Cal. 153, 156-157.)
 If the defendant stands convicted of two or more crimes and is subject to multiple terms of imprisonment, it is the further duty of the trial court to decide in its discretion whether such terms are to be served concurrently or consecutively. (Pen. Code, § 669.)  It is true that where, as here, the second conviction is for the crime of escape from a state prison, the Legislature has made it mandatory that the terms be consecutive (former Pen. Code § 4530; see fn. 2, ante); but the judgment declaring that the individual defendant before the court shall serve such terms is nevertheless an integral part of the judicial act of sentencing and committing him to prison (see Pen. Code, § 1213.5).
[1b] Applying these principles, it appears that the Adult Authority has no jurisdiction to determine that petitioner's sentences shall be served consecutively rather than concurrently. In In re Mann (1923) 192 Cal. 165 [219 P. 71], the trial court imposed two concurrent five-year prison terms; the defendant sought habeas corpus, alleging that the state board of prison directors had fixed his terms to run consecutively. Although this court interpreted the board's action otherwise, we stated (at p. 166) that "as the sentences were to run concurrently, by the judgment of the trial court, the maximum term of imprisonment was five years. This maximum term fixed the limit of the jurisdiction of the state board, and it could not be increased by them beyond this term of five years." More recently, in In re Patton (1964) 225 Cal.App.2d 83, 88 [36 Cal.Rptr. 864], the defendant's second term was deemed by operation of law (Pen. Code, § 669) to run concurrently with his first; the Adult Authority in effect treated the terms as consecutive, and the defendant sought habeas corpus. The appellate court granted the writ, holding that "The Adult Authority does not have jurisdiction to determine whether a second sentence shall be consecutive or concurrent. This is a judicial function, clearly set out in section 669. In re Radovich, supra, 61 Cal.App.2d 177, 179 [142 P.2d 325].)" In Radovich the same issue was raised and the Attorney General "conceded" that the Board of Prison Terms and Paroles was "without authority, on its own initiative, to provide that petitioner's terms shall run consecutively, and that any attempt on its part to order them to run consecutively would be void, since this involves a matter of judicial discretion solely within the province of the courts...."
 No different conclusion is compelled here by the fact that in the first place the trial court had no power to make petitioner's terms concurrent rather than consecutive. The correction of an act of sentencing in excess of jurisdiction of the court is just as much a judicial function as the sentencing itself, and is likewise beyond the jurisdiction of the Adult Authority or any other administrative body. Thus in a case in which the defendant had been sentenced to consecutive terms even though in the circumstances the statute (Pen. Code, § 669) expressly required the terms to be concurrent, the Attorney General properly ruled that the error was judicial and could not be corrected by administrative action. (7 Ops. Cal.Atty.Gen. 108, 110.) The opinion declared that "`Technically, we believe the Adult Authority would not be empowered to modify the status of the prisoner as established by the trial court. It would require the modification of the judgment which is a judicial function and not an administrative act. We are unable to find any judicial authority giving this power to the Adult Authority.' (6 Ops.Cal.Atty.Gen. 36, at 37.) The remedy to correct this judgment is by judicial pronouncement or decree in some proceeding which must be initiated by the prisoner, such as habeas corpus, in a court of competent jurisdiction. Until these sentences have been corrected by such court, having jurisdiction over the person of the inmate, it is the duty of the Board of Trustees to give these sentences the full effect ordered and decreed by the sentencing court."
This view has been adopted by the courts. In In re Rye (1957) 152 Cal.App.2d 594 [313 P.2d 914], the defendant was erroneously sentenced to consecutive terms in a situation in which concurrent terms were required by statute; the Adult Authority gave effect to the consecutive aspect of the sentence, and the defendant sought habeas corpus. The appellate court rectified the error and held the terms to be concurrent. In passing, the court remarked that "The Adult Authority quite properly accepts such a judgment as it finds it. (See 7 Ops. Atty.Gen. 108.) The error of a court in providing for consecutive sentences should be corrected by judicial order, not by administrative action." (Id. at p. 596, fn. 1.)
Finally, the same type of error in sentencing as here committed was judicially corrected in In re Tinsley (1960) 178 Cal.App.2d 15 [2 Cal.Rptr. 642], certiorari denied, 364 U.S. 839 [81 S.Ct. 76, 5 L.Ed.2d 63]. There the defendant, while under sentence for robbery and kidnaping, pleaded guilty to a charge of conspiring to escape from state prison; the judgment on such plea directed that the term of imprisonment run concurrently with the prior term; the defendant sought habeas corpus, asking to have the entire second judgment declared void for failure to comply with the requirement of consecutive terms imposed by Penal Code section 4530. The opinion stated (id. at p. 17) that "the trial court was not empowered to order that his term of imprisonment for violation of section 4530 should run concurrently with those sentences that he was currently serving. That part of the judgment so providing must be disregarded. (In re Rye, 152 Cal.App.2d 594, 596 [313 P.2d 914].) But that part of the judgment sentencing petitioner to `the term prescribed by law' is valid. Ordinarily we would merely so declare and hold that petitioner's term of imprisonment for his violation of section 4530 will `commence from the time he would otherwise have been discharged from said prison.' (In re Rye, supra.)"4
 Since the entire question of the legality of petitioner's confinement is before us on this application for habeas corpus, we take the opportunity to make a judicial correction of the sentencing error which the Adult Authority has purported to deal with by administrative action alone. We hold, accordingly, that the portion of the judgment ordering petitioner's sentence for escape to be served concurrently with his prior sentence for robbery is of no legal effect. It must be disregarded as surplusage, and petitioner is deemed to be under the consecutive sentences required by Penal Code section 4530 at the time of his conviction of escape. (See In re Rye (1957) supra, 152 Cal.App.2d 594, 597.)
Our disposition of the matter in this proceeding, however, must not be construed by the Adult Authority to indicate that if a sentencing error of the same or similar nature recurs, the burden is on the defendant to initiate judicial action to correct it. On the contrary, in such event it is the People who are under a duty to bring the error to the attention of the trial court as soon as possible, by appropriate motion to vacate the void portion of the judgment and impose a sentence authorized by law. (See, e.g., In re Robinson (1956) 142 Cal.App.2d 484, 486 [298 P.2d 656], and cases cited.)
Petitioner is not entitled to discharge at this time from the constructive custody of the Adult Authority. Aside from the question of concurrent or consecutive terms, the remainder of the judgment convicting him of escape and sentencing him to state prison "for the term provided by law" is valid. It was on the assumption of consecutive sentences such as here ordered that the Adult Authority undertook to fix petitioner's terms and release him on parole, and nothing we have said requires us to disturb those determinations.
The petition for habeas corpus is denied, and the order to show cause, having served its function, is discharged.
Traynor, C.J., McComb, J., Peters, J., Tobriner, J., Peek, J., and Burke, J., concurred.