*1143Opinion
RAMIREZ P. J.Defendant and respondent Nyaga Kirimi Mbaabu pled guilty to one count charging criminal threats (Pen. Code,1 § 422) as a misdemeanor pursuant to a plea agreement. He was not specifically admonished that the offense to which he pled guilty constituted an aggravated felony under immigration law when punished by a sentence of 365 days. More than a year after the plea and the United States Supreme Court decision in Padilla v. Kentucky (2010) 559 U.S. 356 [176 L.Ed.2d 284, 130 S.Ct. 1473] (Padilla), defendant made a motion to withdraw his guilty plea on the ground that his attorney’s failure to admonish him of the mandatory immigration consequences of the plea constituted ineffective assistance of counsel. The first motion was denied, and defendant filed a new motion to vacate the judgment three months later on the same grounds. The trial court granted the second motion, reinstating the felony charges, and the People appealed.
On appeal, the People argue that (1) the trial court lacked authority to grant defendant’s motion, whether deemed a petition for writ of error coram nobis, or a habeas corpus petition, and (2) trial counsel was not ineffective. We reverse.
BACKGROUND
By information filed on March 23, 2009, defendant was charged with two counts of criminal threats, pursuant to section 422. Prior to the preliminary hearing the court had declared a doubt as to defendant’s competence (§ 1368), resulting in a suspension of criminal proceedings, and after defendant was arraigned on the information, the court again declared a doubt as to defendant’s competence. During the second period of suspended proceedings, new counsel was retained to represent defendant. Defendant remained committed pursuant to section 1368 until January 8, 2010, when defendant was found to have regained his competence and criminal proceedings were reinstated.
On March 5, 2010, defendant entered into a plea bargain, under which defendant pled guilty to one count of criminal threats as a misdemeanor, in return for dismissal of the remaining charge. The plea agreement also included a stipulated terminal disposition of 365 days in jail with credit for 365 days served. Retained counsel would have counteroffered for a 364-day sentence if he had known that a jail term of 365 days made the conviction an aggravated felony. Retained counsel never discussed the issue of aggravated felony versus nonaggravated felony for purposes of immigration consequences with defendant.
*1144On March 31, 2010, the United States Supreme Court issued its decision in Padilla, supra, 559 U.S. at page 359 [130 S.Ct. at p. 1478]. That case held that constitutionally competent counsel would have advised the defendant that his drug distribution conviction made him subject to automatic deportation.
On November 8, 2011, a second newly retained defense attorney filed a motion to reduce defendant’s sentence. The motion was based on the fact that the prior defense attorney failed to advise defendant that a term of 365 days in jail exposed him to deportation (removal).2 Defendant relied on the authority of Padilla, as well as In re Resendiz (2001) 25 Cal.4th 230 [105 Cal.Rptr.2d 431, 19 P.3d 1171], in mating the motion. At the hearing on the motion on November 16, 2011, counsel amended the motion, mating it a motion to withdraw the guilty plea. The trial court denied the motion to withdraw the plea. Defendant did not appeal that order.
On January 13, 2012, the same counsel who filed the prior motion to withdraw the plea filed a motion to vacate the judgment on defendant’s behalf. Again, the motion was grounded on the 2010 United States Supreme Court holding of Padilla, supra, 559 U.S. 356 [130 S.Ct. 1473]. The motion was heard on February 7, 2012, and was granted, resulting in the reinstatement of the felony charges. The People appealed.
DISCUSSION
The People argue that the trial court erred in granting the nonstatutory motion to vacate the judgment because the trial court lacked authority to grant a petition for writ of error coram nobis on the grounds that (a) immigration consequences are not a “fact” that, if known, would have prevented defendant from entering the plea bargain, and (b) ineffective assistance of counsel is not cognizable on coram nobis. In the alternative, the People argue that trial counsel who negotiated the plea bargain was not ineffective, that the holding of Padilla is not retroactive, and that defendant was not prejudiced within the meaning of Strickland v. Washington (1984) 466 U.S. 668 [80 L.Ed.2d 674, 104 S.Ct. 2052].
We hold that a motion to vacate the judgment in the nature of coram nobis is not a proper vehicle for relief from a constitutional violation of defendant’s right to effective assistance of counsel. Further, even if defendant’s motion was treated as a petition for writ of habeas corpus, it should *1145have been denied as untimely and duplicative, in addition to lacking any evidence from defendant that he would have rejected the offer and gone to trial had he been properly advised of immigration consequences.
1. Coram Nobis Is Not a Proper Vehicle to Vacate or Withdraw a Guilty Plea on the Ground of Ineffective Assistance of Counsel.
The People argue that the trial court erroneously granted defendant’s motion to vacate his guilty plea. The People assert that immigration consequences are not a “fact” that, if known, would have prevented defendant from entering the plea agreement. The People also assert that a petition for writ of error coram nobis is not a proper vehicle for relief from constitutional violations, such as ineffective representation by trial counsel. We agree with the second proposition.3
Since 1977, section 1016.5 has required the trial court, before accepting a plea of guilty or nolo contendere, to advise a defendant in an appropriate case that the plea may have immigration consequences. (People v. Castaneda (1995) 37 Cal.App.4th 1612, 1615 [44 Cal.Rptr.2d 666].) If the court fails to give the advisement and if the defendant shows that his conviction may result in deportation, exclusion, or denial of naturalization, then “ ‘the court, on defendant’s motion, shall vacate the judgment and permit the defendant to withdraw the plea of guilty or nolo contendere, and enter a plea of not guilty.’ ” (Ibid.)
The relief under section 1016.5 differs from the statutory provisions for vacating or withdrawing a guilty plea pursuant to section 1018 in that a motion to vacate the judgment under section 1016.5 may be brought after judgment has been entered on a plea, whereas a motion to withdraw a plea under section 1018 must be brought before judgment. (People v. Castaneda, supra, 37 Cal.App.4th at p. 1617.) Section 1016.5 addresses only the duty of the court to admonish a defendant of the possibility that a conviction may result in removal from the United States, or preclude naturalization (People v. Chien (2008) 159 Cal.App.4th 1283, 1288 [72 Cal.Rptr.3d 448]), and does not address the obligation to explain the more particular consequences required under the holding of Padilla v. Kentucky, supra, 559 U.S. 356 [130 S.Ct. 1473]. Defendant’s motions, grounded on counsel’s obligation to advise defendant of immigration consequences under Padilla, were not statutory motions to vacate pursuant to section 1016.5.
*1146Thus, we must treat his two motions as postjudgment petitions for writs of error coram nobis. A lower court’s ruling on a petition for the writ is reviewed under the abuse of discretion standard. (People v. Kim (2009) 45 Cal.4th 1078, 1095-1096 [90 Cal.Rptr.3d 355, 202 P.3d 436]; see People v. McElwee (2005) 128 Cal.App.4th 1348, 1352 [27 Cal.Rptr.3d 448].)
A motion to vacate the judgment is recognized as equivalent to a petition for the common law remedy of a writ of error coram nobis. (People v. Gari (2011) 199 Cal.App.4th 510, 522 [132 Cal.Rptr.3d 80]; see People v. Castaneda, supra, 37 Cal.App.4th at p. 1618, and cases cited.) To be entitled to relief on a postjudgment motion to vacate the judgment, the courts have required a showing essentially identical to that required under section 1018, that is, on account of duress, fraud, or other fact overreaching the free will and judgment of a defendant he is deprived of the right of a trial on the merits. (Gari, at p. 523.) Where application for relief is made after judgment and after the time for appeal has passed, relief is available if a properly supported motion is seasonably made, but this exceptional remedy applies “ 1 “only upon a strong and convincing showing of the deprivation of legal rights by extrinsic causes.” ’ ” (Ibid.)
The grounds on which a litigant may obtain relief via a writ of error coram nobis are narrower than on habeas corpus. (People v. Kim, supra, 45 Cal.4th at p. 1091, citing In re Lindley (1947) 29 Cal.2d 709, 724-725 [177 P.2d 918].) The writ’s purpose is to secure relief, where no other remedy exists, from a judgment rendered while there existed some fact which would have prevented its rendition if the trial court had known it and which, through no negligence or fault of the defendant, was not then known to the court. (Kim, at p. 1091, citing People v. Adamson (1949) 34 Cal.2d 320, 326-327 [210 P.2d 13].)
The writ of error coram nobis is granted only when three requirements are met. Those requirements are set forth in the decision of People v. Shipman (1965) 62 Cal.2d 226, 230 [42 Cal.Rptr. 1, 397 P.2d 993]: (1) The petitioner must show that some fact existed which, without any fault or negligence on his part, was not presented to the court at the trial on the merits, and which if presented would have prevented the rendition of the judgment. (2) The petitioner must also show that the newly discovered evidence does not go to the merits of issues tried; issues of fact, once adjudicated, even though incorrectly, cannot be reopened except on motion for new trial. This second requirement applies even though the evidence in question is not discovered until after the time for moving for a new trial has elapsed or the motion has been denied. (3) The petitioner must show that the facts upon which he relies were not known to him and could not in the exercise of due diligence have been discovered by him at any time substantially earlier than the time of his petition for the writ. These factors, set forth *1147in Shipman, continue to outline the modem limits of the writ. (People v. McElwee, supra, 128 Cal.App.4th at p. 1352.)
Because the writ of error coram nobis applies where a fact unknown to the parties and the court existed at the time of judgment that, if known, would have prevented rendition of the judgment, the remedy does not lie to enable the court to correct errors of law. (People v. Kim, supra, 45 Cal.4th at p. 1093.) This includes constitutional claims, such as a claim that counsel was ineffective in failing to admonish a defendant of the immigration consequences of his conviction. (Id. at pp. 1095, 1104, 1108-1109.)
In People v. Kim, supra, 45 Cal.4th 1078, the defendant brought a motion to vacate misdemeanor convictions on the ground his trial counsel failed to investigate the immigration consequences and to advise him against entering a plea that would result in mandatory deportation. (Id. at p. 1096.) The California Supreme Court concluded that the defendant was not entitled to relief by way of a petition for writ of error coram nobis because, among other procedural defects, the ground for the petition, ineffective assistance of counsel, was an inappropriate ground for relief on coram nobis. (Id. at p. 1104.)
In the present case, the trial court found in favor of defendant on the ground that defendant’s prior trial counsel failed to ascertain whether a jail term of 365 days exposed defendant to the immigration consequences of removal. This was an abuse of discretion because the first motion, which was originally styled as a motion to modify the sentence and later amended to request permission to withdraw the plea on the ground of ineffective assistance of counsel, was not appealed following its denial. Instead, defendant waited nearly another three months to bring a second motion to vacate the judgment on the identical ground. A prior appealable order becomes res judicata in the sense that it becomes binding in the same case if not appealed. (In re Matthew C. (1993) 6 Cal.4th 386, 393 [24 Cal.Rptr.2d 765, 862 P.2d 765].) Defendant’s original motion, amended to request leave to withdraw his plea due to ineffective assistance of counsel, was appealable as an order after judgment. (§ 1237, subd. (b).)
The second motion to vacate the judgment, the equivalent of a petition for writ of error coram nobis (People v. Gutierrez (2003) 106 Cal.App.4th 169, 172 [130 Cal.Rptr.2d 429]), addressing the same constitutional claim of ineffective assistance of counsel, was not a proper vehicle for relief from the judgment. Because the “fact” on which the motion was made was known to defendant at the time of the original motion, it was not a new “fact” that was undiscoverable despite the exercise of due diligence in the second motion. (See People v. Gari, supra, 199 Cal.App.4th at p. 519.) The issue was well understood in November 2011, and no newly discovered facts were alleged.
*1148Additionally, binding precedent holds that constitutional violations, such as violations of a defendant’s right to effective assistance of counsel, are not properly presented in a petition for writ of error coram nobis. (People v. Kim, supra, 45 Cal.4th at p. 1104.) Finally, defendant did not demonstrate diligence in pursuing his remedies by failing to appeal the denial of his original motion, given that Padilla had already been decided, and was cited by defendant, when the first motion was made.
The trial court abused its discretion in granting defendant’s second motion to vacate the judgment.
2. Even if the Trial Court Is Deemed to Have Treated Defendant’s Motion as a Petition for Writ of Habeas Corpus, It Was Improperly Granted.
Because the basis for the trial court’s ruling was a finding that defendant’s constitutional right to effective assistance of counsel had been violated, and because both parties have presented arguments on the merits of the ineffective assistance of counsel claim, we consider whether defendant would have been entitled to relief by way of a petition for writ of habeas corpus.4 Even as a habeas corpus petition, defendant was not entitled to relief.
A petition for a writ of habeas corpus is a collateral attack on a presumptively final judgment, which imposes upon a defendant a heavy burden of pleading sufficient grounds for relief and proving them. (In re Crew (2011) 52 Cal.4th 126, 149 [127 Cal.Rptr.3d 285, 254 P.3d 320].) A petitioner is expected to demonstrate due diligence in having pursued potential claims. (In re Clark (1993) 5 Cal.4th 750, 775 [21 Cal.Rptr.2d 509, 855 P.2d 729].)
To prevail on a claim that he was deprived of the effective assistance of counsel, a defendant must prove that counsel’s representation fell below an objective standard of reasonableness under prevailing professional norms, and that counsel’s deficient performance was prejudicial, i.e., that a reasonable probability exists that, but for counsel’s failings, the result would have been more favorable to the defendant. (In re Roberts (2003) 29 Cal.4th 726, 744-745 [128 Cal.Rptr.2d 762, 60 P.3d 165], citing In re Resendiz, supra, 25 Cal.4th at p. 239.) These requirements were established by Strickland v. Washington, supra, 466 U.S. 668.
*1149A “ ‘reasonable probability’ ” is a probability sufficient to undermine confidence in the outcome. (People v. Bolin (1998) 18 Cal.4th 297, 333 [75 Cal.Rptr.2d 412, 956 P.2d 374].) If a claim of ineffective assistance of counsel can be determined on the ground of lack of prejudice, a court need not decide whether counsel’s performance was deficient. (Strickland v. Washington, supra, 466 U.S. at p. 697; In re Cox (2003) 30 Cal.4th 974, 1019-1020 [135 Cal.Rptr.2d 315, 70 P.3d 313].)
For a defendant still in actual or constructive custody, a petition for writ of habeas corpus in the trial court is the preferred method by which to challenge circumstances or actions declared unconstitutional after the defendant’s conviction became final. (People v. Picklesimer (2010) 48 Cal.4th 330, 339 [106 Cal.Rptr.3d 239, 226 P.3d 348], citing People v. Fuhrman (1997) 16 Cal.4th 930, 942 [67 Cal.Rptr.2d 1, 941 P.2d 1189].) But once a defendant has been released and is no longer subject to parole or probation, he or she is no longer in constructive custody and this avenue is foreclosed. (People v. Villa (2009) 45 Cal.4th 1063, 1069-1070 [90 Cal.Rptr.3d 344, 202 P.3d 427]; see People v. Kim, supra, 45 Cal.4th at p. 1108.) Moreover, collateral consequences of a criminal conviction—even those that can later form the basis of a new criminal conviction—do not of themselves constitute constructive custody. (Villa, at p. 1070.) Thus, a party no longer in constructive custody may not challenge his conviction on the ground he was deprived of effective assistance of counsel by way of habeas corpus. (Kim, at p. 1108.)
Here, there are several reasons why relief by way of habeas corpus was unavailable: First, defendant was not in actual or constructive custody at the time of either motion because the terminal disposition resulted in defendant’s immediate release with no probation.
Second, despite trial counsel’s admission that he did not explain the difference between a 364-day sentence and a 365-day term, the statement by defendant’s counsel that defendant would not have pled guilty if he had been properly admonished does not establish a reasonable probability of a more favorable result. Without the plea bargain, defendant faced two felony charges and there is nothing in the record to support a conclusion that he would have been convicted of anything less than two felonies if he had proceeded to trial, or that the People would have been amenable to a 364-day disposition.
Third, defendant failed to exercise diligence in presenting his claims timely. The Padilla decision came down approximately three weeks after defendant entered his plea, and was issued more than a year prior to the original motion to reduce the sentence which was later amended to seek to withdraw the plea. Defendant did not appeal the denial of the first motion. *1150Instead, he filed a second motion in the superior court several months later. A petitioner bears the burden of establishing, through his or her specific allegations, which may be supported by any relevant exhibits, the absence of substantial delay. (In re Reno (2012) 55 Cal.4th 428, 462 [146 Cal.Rptr.3d 297, 283 P.3d 1181].)
Thus, even if the trial court could have deemed the motion to be a petition for writ of habeas corpus, no viable grounds for relief were established.
DISPOSITION
The judgment is reversed.
McKinster, J., and Miller, J., concurred.
A petition for a rehearing was denied March 15, 2013, and appellant’s petition for review by the Supreme Court was denied May 22, 2013, S209480.
All further statutory references are to the Penal Code unless otherwise specified.
On June 13, 2012, defendant made a request that we take judicial notice of minute orders entered after defendant was rearrested following the reinstatement of the felonies showing he was then in custody, along with documentation relating to the pending immigration proceedings. We decline to take judicial notice of these matters as they are not relevant to the issues presented in the appeal.
Section 1016.5 expressly provides relief in situations where the court has failed to advise a defendant of the possibility of certain immigration consequences as a result of a guilty plea, and since a motion to vacate judgment is tantamount to a petition for writ of error coram nobis, ignorance of immigration consequences would seem to qualify as a fact which might prevent a valid judgment where the defendant is not properly admonished. (See People v. Carty (2003) 110 Cal.App.4th 1518, 1528, fn. 10 [2 Cal.Rptr.3d 851].)
Because we must affirm if the court’s ruling was correct on any basis, we consider alternative bases for the order. (People v. Jones (2012) 54 Cal.4th 1, 50 [140 Cal.Rptr.3d 383, 275 P.3d 496] [A ruling or decision, itself correct in law, will not be disturbed on appeal merely because given for a wrong reason. “ ‘ “ ‘ “If right upon any theory of the law applicable to the case, it must be sustained regardless of the considerations which may have moved the trial court to its conclusion.” ’ ” ’ ”]; see People v. Letner and Tobin (2010) 50 Cal.4th 99, 145 [112 Cal.Rptr.3d 746, 235 P.3d 62].)