
47 Cal.2d 814 (1957)
In re LEON BINE, on Habeas Corpus.
Crim. No. 5953. 
Supreme Court of California. In Bank.  
Feb. 1, 1957.
 Irmas, Rutter & Halper and William A. Rutter for Petitioner.
 William B. McKesson, District Attorney (Los Angeles), Adolph Alexander, Chief Deputy District Attorney, Jere J. Sullivan, Lewis Watnick and Fred N. Whichello, Deputy District Attorneys, for Respondent.
 SHENK J.
 This is a proceeding in habeas corpus to determine whether the court exceeded its jurisdiction in modifying the terms of petitioner's probation.
 Petitioner and four codefendants, Jarosh, Chapman, Sergent and Thrift, were charged with conspiracy to defraud certain insurance companies. Each pleaded guilty and requested probation. Probation reports were prepared in the probation department from information obtained from the defendants and from the investigation department of the district attorney's office. At the probation hearing on June *816 18, 1956, the court stated that it had read the probation report for this petitioner and granted him probation. The following minute order was thereupon entered: "Proceedings suspended, 5 years probation, fined $1,000.00, payable as directed by probation department, to obey all laws." On July 1, 1956, the probation department accepted as satisfactory an initial payment of $25 from petitioner. On July 17th the court, on its own motion, set July 31st for hearing for modification of the terms of probation. Its action was precipitated by reason of an affidavit made by codefendant Chapman dated June 19, 1956, which stated that the affiant wanted "to correct an error of information available to the Court at the time of the sentencing of Howard Jarosh." In ordering a hearing the court stated that it had had a further investigation made and had found "that there was outright deceit practiced upon the Probation Department and the court granting the original probation." Supplemental probation reports were furnished as to each defendant, including petitioner. The affidavit of Chapman contains no reference, direct or indirect, to petitioner. The supplementary probation report states that "Subsequent investigation and questioning of [petitioner] does not materially modify or bring to light any information not included in the original report submitted to the court." No evidence was presented at the hearing as to petitioner which was not before the court on June 18th. After the hearing a minute order was entered which provided, as to petitioner: "Probation modified, requirement of fine is vacated and set aside, defendant required to serve next 6 months in county jail, good time is recommended, honor farm or road camp recommended. Defendant remanded."
 The question before us is whether the court exceeded its jurisdiction in modifying the probation of petitioner and whether the remedy of habeas corpus is available to him. It should be observed that no problem is here presented as to improper conduct by petitioner or violation of the terms of his original probation.
 The record before us clearly indicates that there was no factual basis for the court's determination that the probation of petitioner should be modified and new terms imposed. Whatever may have appeared as to the other codefendants, the record of which is not before us, it is apparent that the court reached a different conclusion upon the same facts *817 which were before it at the time it imposed the original terms of probation.
 [1] Probation is an act of clemency and may be withdrawn if the privilege is abused. [2] An abuse of privilege is shown where a defendant practices a deception upon the court at the time probation is granted (People v. Sapienzo, 60 Cal.App. 626, 629 [213 P. 274]) or violates any of the terms or conditions of probation. (Pen. Code,  1203.2.) In such case the court is specifically authorized to modify and change any and all of the terms and conditions of probation. (Pen. Code,  1203.1.) [3] While it has a wide discretion in imposing or modifying the terms of probation, it may not act arbitrarily or capriciously. (In re Davis, 37 Cal.2d 872, 875 [236 P.2d 579]; In re Dearo, 96 Cal.App.2d 141, 143 [214 P.2d 585].) Its determination must be based upon the facts before it.
 [4] The order of June 18th granting probation was an appealable order under the express terms of the 1951 amendment to subdivision 1 of section 1237 of the Penal Code. This section reads: "An appeal may be taken by the defendant: 1. From a final judgment of conviction; an order granting probation shall be deemed to be a final judgment within the meaning of this section. 2. ... 3. From any order made after judgment, affecting the substantial rights of the party." The appealability of an order modifying probation has heretofore not been judicially determined. In People v. Robinson, 43 Cal.2d 143 [271 P.2d 872], we held that an order revoking probation is not an appealable order within the meaning of subdivision 3 of section 1237 of the Penal Code but remains an intermediate order reviewable on appeal from the judgment. There the order revoking probation and the judgment were entered at the same time. As stated in People v. Johnson, 134 Cal.App.2d 140, 142-143 [285 P.2d 74], the purpose of revoking probation in the Robinson case was so that judgment and sentence could be pronounced. [5] However, the court has jurisdiction, upon revocation of probation, to place the defendant upon a new probation, with new conditions. [6] Should it arbitrarily modify a probationary order without imposing judgment and sentence, an appeal would lie therefrom under subdivision 3 of section 1237 as an appeal from an order made after judgment affecting the substantial rights of the probationer. [7] It is the general rule that the writ of habeas corpus may not be *818 employed to serve the purpose of an appeal. (In re Dixon, 41 Cal.2d 756 [264 P.2d 513].)
 [8] However, in view of the uncertainty in the law at the time the petitioner sought the writ and in the absence of a judicial determination at that time as to whether an order modifying probation is an appealable order, we are disposed to apply the rule suggested in Phelan v. Superior Court, 35 Cal.2d 363, 371 [217 P.2d 951], and to hold under the circumstances here appearing that the petitioner should not be denied the use of the writ of habeas corpus for the purpose of defining his rights as against the order complained of when the court now for the first time is deciding that the order was appealable. We issued an order to show cause why a writ of habeas corpus should not be granted. A return to the order to show cause has been filed which, together with the showing made in the petition, serves as a record upon which the application may be determined.
 [9] It is clear that the order of July 31, 1956, insofar as it relates to the petitioner, was made in excess of the jurisdiction of the court for the reason that there was no factual basis to support it. It was therefore ineffective. [10] But the void order of modification did not destroy the original probationary order. The petitioner is still subject to the terms of that order and is in the custody of the Superior Court in and for the County of Los Angeles with supervisory control through the probation officer of the court.  [fn. *]
 The writ is granted. The return to the order to show cause shall stand as the return to the writ. The petitioner is discharged from the custody of the sheriff of Los Angeles County and remanded to the custody of the probation officer of the superior court in that county pursuant to the order of that court made and entered June 18, 1956.
 Gibson, C.J., Carter, J., Traynor, J., Schauer, J., Spence, J., and McComb, J., concurred.
NOTES
[fn. *]  *. Penal Code  1203.1 provides, in pertinent part, "... in all cases where confinement in a county jail has not been a condition of the grant of probation, the court shall place the defendant or probationer in and under the charge of the probation officer of the court, for the period or term fixed for probation. ..." Cf. In re Albori, 218 Cal. 34, 38 [21 P.2d 423], where a petitioner was ordered to be released upon parole and to be committed to the custody of the board of prison terms and paroles. Penal Code,  1493 provides that "In cases where any party is held under illegal restraint or custody, or any other person is entitled to the restraint or custody of such party, the judge or court may order such party to be committed to the restraint or custody of such person as is by law entitled thereto."
