
51 Cal.2d 838 (1959)
In re WILLIAM HOWARD CLARK, on Habeas Corpus.
Crim. No. 6383. 
Supreme Court of California. In Bank.  
Apr. 3, 1959.
 Robert H. Lund for Petitioner.
 Edmund G. Brown, Attorney General, William E. James, Assistant Attorney General, James Don Keller, District Attorney (San Diego), and Claude B. Brown, Deputy District Attorney, for Respondent.
 McCOMB, J.
 This is a proceeding in habeas corpus filed by Robert H. Lund, an attorney, hereinafter referred to as "petitioner," to determine whether the court exceeded its jurisdiction in modifying the terms of probation of William Howard Clark, hereinafter referred to as "defendant."
 Chronology
 1. May 16, 1952, defendant pleaded guilty in the Superior Court of San Diego County to the crime of violating section 288a of the Penal Code.
 2. June 2, 1952, Judge Glen suspended imposition of sentence for five years (until June 1, 1957) and imposed certain conditions of probation.
 3. March 27, 1956, defendant was in custody because he had violated probation for a misdemeanor conviction of another violation of section 288a of the Penal Code. On that date Judge Glen held a hearing relative to modification of probation and ordered that defendant be released from custody and that the terms of the original probation order remain in effect.
 4. March 28, 1956, Judge Hewicker, ex parte, at the request of the probation officer, purportedly extended the term of the probation three years to June 1, 1960. The facts upon which he acted were the same as those upon which Judge Glen had acted on March 27, 1956.
 5. In 1958 defendant suffered another misdemeanor conviction for violating section 288a of the Penal Code and was taken into custody for violation of probation.
 6. November 12, 1958, petitioner sought habeas corpus on the ground that the order of March 28, 1956, purportedly extending the term of probation, was made without the court's having jurisdiction and that defendant's probationary period had therefore expired. Judge Glen denied the application for the writ, and Judge Hewicker revoked defendant's probation and imposed sentence.
 Defendant is now in the custody of E. J. Oberhauser, Superintendent of California Institution for Men, at Chino. *840
 Questions: First. Was Judge Hewicker's order of March 28, 1956, purportedly extending the term of probation, void because the court exceeded its jurisdiction in making it?
 Yes. [1] An order modifying the terms of probation based upon the same facts as the original order granting probation is in excess of the jurisdiction of the court, for the reason that there is no factual basis to support it. (In re Bine, 47 Cal.2d 814, 818 [9] [306 P.2d 445].)
 [2] Applying the foregoing rule to the facts of the present case, it appears that Judge Glen, by his order of March 27, 1956, exhausted the jurisdiction of the court to act as to modification of probation upon the facts then before him, and that Judge Hewicker was therefore without jurisdiction to extend the term of probation by his ex parte order of March 28, 1956, predicated upon the same facts.
 On the application before him, Judge Glen could have extended the probationary period. Therefore, the question of whether or not, upon the facts before the court on March 27, 1956, such action should be taken was conclusively determined by the order entered on that date.
 [3] Since the court was without jurisdiction to make the March 28th order extending the probationary period, it follows that such period expired on June 1, 1957. Therefore, the court lacked jurisdiction or power to revoke the probation and enter judgment on November 12, 1958. (People v. O'Donnell, 37 Cal.App. 192, 196 [174 P. 102].)
 Second. Since defendant could have appealed from the order of March 28, 1956,  [fn. 1] and the judgment of November 12, 1958,  [fn. 2] is a writ of habeas corpus now available to him?
 Yes. [4] It is the general rule that a writ of habeas corpus cannot serve as a substitute for an appeal. (In re Dixon, 41 Cal.2d 756, 759 [1] [264 P.2d 513].) [5] An exception to this rule is: A writ of habeas corpus will lie where it appears upon the face of the record that the trial court lacked jurisdiction to impose the order or judgment pursuant to which the petitioner is held in custody. (In re Ballas, 53 Cal.App. 109, 111 [1] [199 P. 816]; In re Garrity, 97 Cal.App. 372, 376 [2] [275 P. 480]; see also 24 Cal.Jur.2d (1955), Habeas Corpus,  13, p. 427.)
 [6] The facts in the present case bring it within the exception *841 to the general rule, since the record shows on its face that Judge Hewicker was without jurisdiction to make the order of March 28, 1956, or pronounce the judgment on November 12, 1958.
 The writ is granted. The return to the order to show cause heretofore issued shall stand as the return to the writ. Defendant is discharged from the custody of the Superintendent of California Institution for Men at Chino. This order applies only to the commitment in the instant case.
 Gibson, C.J., Shenk, J., Traynor, J., and Schauer, J., concurred.
 SPENCE, J.
 I dissent.
 In my opinion, it does not appear "upon the face of the record" or otherwise "that the trial court lacked jurisdiction" to make the order of March 28, 1956, extending the duration of probation to June 1, 1960. The majority opinion apparently concedes that unless it does so appear, then defendant is properly confined under the sentence imposed on November 12, 1958, following defendant's third conviction for repeated violations of section 288a of the Penal Code.
 Upon a prior habeas corpus proceeding instituted in the superior court in 1958, Judge Glen reviewed the record and concluded that "the extension was proper and that the court had a right and jurisdiction to do it." I agree with that conclusion. It appears that the application which had been made by the probation officer to Judge Glen on March 27, 1956, was for revocation of probation, and not for extension of probation; that Judge Glen then denied revocation by ordering defendant's release from the custody of the sheriff and his continuation on probation; that Judge Glen did not pass upon any application for extension; that Judge Glen "probably would have extended it" if such application had been made; that the cause was then returned to the department of the presiding judge where post-sentence proceedings were normally heard; and that thereafter "the probation officer took it into the presiding department as a matter of routine that it be extended." Under these circumstances, I find no inconsistency between the order of March 27, 1956, denying the application for revocation or probation, and the order of March 28, 1956, granting the application for extension of probation. *842
 The majority opinion rests solely upon the authority of In re Bine, 47 Cal.2d 814 [306 P.2d 445], but that case is clearly distinguishable. This court there pointed out that "no problem is here presented as to improper conduct by petitioner or violation of the terms of his original probation"; and that the trial court simply "reached a different conclusion upon the same facts which were before it at the time it imposed the original terms of probation." (Pp. 816-817.) It was therefore held that the order modifying the original order of probation, by adding a jail sentence as a condition thereof without any new facts to support such order of modification, "was made in excess of the jurisdiction of the court for the reason that there was no factual basis to support it." (P. 818.) Here, however, there was improper conduct by defendant and there was a violation of the original terms of probation, and it is clear that there were ample new facts to support the order of extension. In my opinion, the mere fact that there had been a prior order denying an application for revocation of probation did not affect the jurisdiction of the court to entertain an application for an extension of the duration of probation based upon the same misconduct and violation of the terms of the original probation. To hold otherwise would result in putting an unwarranted and unadministering the beneficent provisions of our statutes redesirable limitation upon the powers of the trial courts in lating to probation.
 In view of the above conclusion, it is unnecessary to discuss the question of whether defendant is foreclosed from raising the point in this proceeding in habeas corpus by reason of his failure to appeal from the judgment of conviction entered on November 12, 1958.
 I would deny the petition and remand the defendant to custody.
NOTES
[fn. 1]  1. In re Bine, 47 Cal.2d 814, 817 [6] [306 P.2d 445].
[fn. 2]  2. People v. Robinson, 43 Cal.2d 143, 145 [4] [271 P.2d 872]; In re Davis, 37 Cal.2d 872, 875 [3] [236 P.2d 579].
