Opinion
On application of the People we issued our writ mandating the respondent superior court to set aside, or in the alternative to show cause why it should not set aside, an order granting a motion of Jose R. Giron, the real party in interest herein, to withdraw his plea of guilty and enter a plea of not guilty to a violation of Health and Safety Code section 11530 (now § 11357, possession of marijuana). Pursuant to stipulation the offense was deemed to be a misdemeanor. 1 The principal issue raised is whether, in the circumstances of this case, the trial court was vested with discretion and, if so, whether it abused such discretion in granting the motion. We conclude that the court had such discretion which it properly exercised and accordingly, discharge the alternative writ and deny the petition.
In 1970, following his plea of guilty, the imposition of judgment was suspended and Giron was placed on probation for three years. In 1971, while still on probation, Giron moved to withdraw the plea “and to vacate the judgment of guilty.” In support of the motion it was alleged that Giron, a citizen of the Republic of El Salvador, was a lawfully admitted permanent resident of the United States, and that following his guilty plea the United States Immigration and Naturalization Service served him with an order to show cause why he should not be deported. The stated ground for deportation was that Giron had been convicted of the offense of possession of marijuana. 2 Giron also alleged that at the time he entered his plea of *796 guilty and accepted probation neither he nor the other parties involved, including the respondent court, were aware that his plea would subject him to deportation.
In granting Giron’s motion and ordering the vacation of his guilty plea, the court also purported to vacate “the judgment of guilty . . . and the sentence imposed pursuant thereto.” It does not appear, however, that the court had ever entered judgment or imposed sentence after placing Giron on probation.
We consider first the status of criminal proceedings wherein the imposition of sentence has been suspended and probation granted. Although such an order granting probation is “deemed to be a final judgment” for the limited purpose of taking an appeal therefrom (Pen. Code, § 1237, subd. 1), it does not have the effect of a judgment for other purposes. (See
Stephens
v.
Toomey
(1959)
In the instant case proceedings continued in the suspended state until reactivated by Giron’s motion to set aside his guilty plea. Although the court, perhaps in response to Giron’s motion which erroneously suggested that judgment had been entered, also erred in purporting to set aside the nonexistent judgment and sentence, the error is of no moment. There was, of course, an outstanding order granting probation and we view the motion and order thereon as directed not only to the withdrawal of the plea of guilty and the entry of a plea of not guilty, but also to the setting aside of the order granting probation, all of which took place prior to the entry of any judgment.
As no judgment had been entered Giron’s motion is governed by Penal Code section 1018, which provides that a guilty plea may be withdrawn before judgment and for good cause shown.
3
The granting of such an application is within the sound discretion of the trial court and must be upheld unless an abuse thereof is clearly demonstrated.
(In re Brown
(1973)
Giron’s motion was presented to the court on the ground that at the time h¿ entered a plea of guilty he, his attorney, the prosecutor and the court were all unaware that deportation would be a collateral consequence of his plea, and that had he been aware of that consequence he would not have bargained for his freedom on probation in. exchange for his concession of guilt. We do not deem the thrust of the argument to be that Giron was entitled as a matter of right to be advised of such collateral consequences prior to the acceptance of his plea nor do we so hold. (See
In re Yurko
(1974)
A trial court, nevertheless, in the exercise of its discretion directed to the promotion of justice may take into consideration such material matters with which an accused was confronted and as to which he made erroneous assumptions when he entered a guilty plea. The court might consider that justice would not be promoted if an accused, willing to accept a misdemeanor conviction and probationary status, cannot by timely action revoke his election when he thereafter discovers that much more serious sanctions, whether criminal or civil, direct or consequential, may be imposed. As a general rule, a plea of guilty may be withdrawn “for mistake, ignorance or inadvertence or any other factor overreaching defendant’s free and clear judgment.”
(People
v.
Butler
(1945)
The situation here is unlike that wherein the accused enters a guilty plea hoping for leniency which is not forthcoming. Such situation has tradi
*798
tionally been held not to constitute a ground for the court to exercise its discretion in allowing the withdrawal of a guilty plea. (See
People
v.
Burkett
(1953)
The situation in the instant case is one in which the court was properly vested with discretion to grant or to deny the motion after considering all factors necessary to bring about a just result. We would not necessarily conclude that a court abused its discretion if it either granted or denied a motion to set aside, a plea of guilty on evidence that an accused was or was not aware of the possibility of deportation; the test of abuse in such circumstances is whether after consideration of all relevant factors there was good cause shown for. granting the motion and whether justice would be promoted thereby. (Pen. Code, § 1018; see
People
v.
Flores
(1974)
Accordingly, we conclude that the respondent court had discretion to permit Giron to withdraw his plea and that there was no abuse in exercising such discretion. The alternative writ of mandate heretofore issued is discharged and the petition for a peremptory writ of mandate is denied.
McComb, J., Tobriner, J., Mosk, J., Burke, J., Sullivan, J., and Clark, J., concurred.
Notes
The People previously appealed from the order granting the motion. It was held that the order was nonappealable and the appeal was dismissed. (People v. Giron (Jan. 16, 1974) 1 Grim. 11029.) That judgment is now final.
8 United States Code section 1251 in part provides: “(a) Any alien in the United States . . . shall, upon the order of the Attorney General, be deported who . . . (11) is, or hereafter at any time after entry has been, a narcotic drug addict, or who at any time has been convicted of a violation of . . . any law or regulation relating to the illicit possession of or traffic in narcotic drugs or marihuana. . . .”
Penal Code section 1018 provides in pertinent part: “On application of the defendant at any time before judgment the court may ... for good cause shown, permit the plea of guilty to be withdrawn and a plea of not guilty substituted. . . . This section shall be liberally construed to effect these objects and to promote justice.”
We do not hold, however, that although a trial court may entertain such a motion prior to judgment, it will always have jurisdiction to do so. Thus when the court has made some appealable order prior to judgment and an appeal therefrom has been taken, the trial court would lack jurisdiction in the matter during pendency of the appeal.
In granting the motion the court purported to rely on
People
v.
Savin
(1940)
