
222 Cal.App.3d 72 (1990)
271 Cal. Rptr. 406
PATRICK RYAN CORLEY, Plaintiff and Respondent,
v.
DEPARTMENT OF MOTOR VEHICLES, Defendant and Appellant.
Docket No. B044493.
Court of Appeals of California, Second District, Division Three.
July 17, 1990.
*74 COUNSEL
John K. Van de Kamp, Attorney General, N. Eugene Hill, Assistant Attorney General, Henry G. Ullerich and Angela Sierra, Deputy Attorneys General, for Defendant and Appellant.
Scott Gailen for Plaintiff and Respondent.
OPINION
DANIELSON, Acting P.J.
The California Department of Motor Vehicles (Department) appeals from a judgment of the superior court granting a petition for writ of mandate (Code Civ. Proc., § 1085) preventing the Department from suspending the driving privileges of Patrick Ryan Corley, a licensee who committed two drunk driving offenses within a seven-year period. (Veh. Code, § 13352, subd. (a)(3).) We reverse the judgment and vacate the writ of mandate.

FACTS AND PROCEDURAL HISTORY
Corley concedes he violated the drunk driving laws of the State of Florida on October 10, 1983, for which he was convicted on November 21, 1983, and the drunk driving law of this state (Veh. Code, § 23152) on October 8, 1988, for which he was convicted in the Pasadena Municipal Court on November 30, 1988.
Following the latter conviction, which was based on Corley's plea of nolo contendere, he was placed on probation for a period of three years, conditioned on his payment of a fine and penalty assessment and completion of an alcoholism treatment program. The court also imposed a 90-day restriction on Corley's license, prohibiting him from driving other than to, *75 from, and during employment, as well as to and from the treatment program.
On February 14, 1989, the Department served Corley with an order suspending his driving privilege for a period of eighteen months on the ground that he had suffered two drunk driving convictions within a seven-year period.
On May 8, 1989, Corley filed a petition for writ of mandate in the superior court, challenging the Department's suspension order. In supporting declarations, Corley and counsel who represented him in connection with the second offense maintained his plea was entered pursuant to a plea bargain in which he was not advised that he would be subject to an 18-month suspension by the Department. In addition, Corley stated he would not have entered a plea of nolo contendere had he been aware of the 18-month mandatory suspension period. He urged the Department was therefore precluded from imposing the suspension order.
Following a hearing held on June 8, 1989, the court ruled in his favor.

ISSUE
(1a) The sole issue presented by this appeal is whether Corley is entitled to a writ of mandamus precluding the Department from suspending his license pursuant to subdivision (a)(3) of Vehicle Code section 13352, because the trial court failed to advise him of this consequence of his bargained-for plea of nolo contendere to his second drunk driving conviction.

DISCUSSION
Except in circumstances not here present, Vehicle Code section 13352, subdivision (a)(3) imposes a mandatory duty upon the Department to suspend for a period of eighteen months the license of any driver who commits two drunk driving offenses within a seven-year period.[1]
*76 (2) A plea of guilty or nolo contendere "can be voluntary only if it is `entered by one fully aware of the direct consequences' of his plea." (Carter v. McCarthy (9th Cir.1986) 806 F.2d 1373, 1375 (italics in original), citing Brady v. United States (1970) 397 U.S. 742, 755 [25 L.Ed.2d 747, 760, 90 S.Ct. 1463, 1472]; In re Birch (1973) 10 Cal.3d 314 [110 Cal. Rptr. 212, 515 P.2d 12].) (3) Thus the appropriate initial inquiry is whether suspension pursuant to Vehicle Code section 13352 is a direct, rather than collateral, consequence of Corley's plea.
In Pollack v. Department of Motor Vehicles (1985) 38 Cal.3d 367 [211 Cal. Rptr. 748, 696 P.2d 141], our Supreme Court held suspension under section 13352 is not precluded by the prosecution's failure to plead and prove conviction of a prior drunk driving offense. However, the court stated in a footnote to the decision: "We recognize the importance of the driving privilege in our society and the possibility of error in the revocation or suspension process. Therefore, to further both the goal of removing drunk drivers from the road, and of ensuring the accuracy of the DMV's records, the sentencing court should inform the defendant that his license will be suspended if the records reflect a prior conviction, that if he does have a prior conviction he may no longer drive, and of the procedures by which to challenge such suspension or revocation." (Id., at p. 381, fn. 9; see also People v. Salazar (1979) 96 Cal. App.3d Supp. 8, 15 [157 Cal. Rptr. 834], requiring advisement of this consequence of a guilty plea "[a]s the Department of Motor Vehicles must revoke the driving privilege pursuant to Vehicle Code section 13352 ... for a second conviction ..."; People v. Dakin (1988) 200 Cal. App.3d 1026, 1033 [248 Cal. Rptr. 206] [where the court assumed advisement was required.]) Given the inevitability of suspension upon conviction of a second drunk driving offense within the statutory period of seven years, we hold suspension is a direct consequence of a plea of guilty or nolo contendere to the second such offense.[2] (1b) Corley was therefore entitled to advisement of this consequence prior to entry of his plea.
*77 (4) Because the rule compelling the trial court to admonish a defendant of the consequences of an admission is a judicially declared rule of criminal procedure, omission of the advisement does not generally require reversal unless the error is prejudicial. (People v. Dakin, supra, 200 Cal. App.3d 1026, 1033.) However, where the defendant's plea was entered pursuant to a plea bargain, and sentence is imposed in excess of the bargained for term, he is entitled to withdraw the plea of guilty or nolo contendere and enter a new plea of not guilty to the charged offense. Further, it has been held that where a defendant has substantially complied with his part of the bargain, so that withdrawal of the plea affords him no real remedy, he is entitled to specific performance of the plea agreement. (Carter v. McCarthy, supra, 806 F.2d 1373, 1377.)
In Carter, supra, the defendant agreed to plead guilty in return for a sentence of two years' imprisonment. He was not advised of a mandatory additional three-year parole term (Pen. Code, § 3000, subd. (a)), and would not have pleaded guilty had he known of it. The court found the parole term a direct consequence of the plea (Carter v. McCarthy, supra, 806 F.2d at p. 1376), noted that the defendant had already served a sentence well in excess of the one for which he bargained, and affirmed the district court's order releasing him from further service under the parole term. (Id., at p. 1377.)
(1c) Here, Corley urges that inasmuch as he had substantially completed the conditions of his court-imposed probation prior to notification by the Department of the present suspension, withdrawal of his plea would afford him no real remedy (Carter v. McCarthy, supra, 806 F.2d 1373, 1377), and due process can be served only by granting him specific performance of the terms of his plea bargain. (Ibid.)
Corley's situation differs from that of Carter. Carter bargained for a two-year prison term, unaware of the mandatory three-year parole term imposing additional limitations on his freedom and rendering him susceptible to additional periods of imprisonment. The parole term was a part of the sentencing scheme concerning which Carter negotiated with the prosecution and the court. Imposition of the parole term violated the terms of the plea bargain among those parties, and Carter sought relief via a petition for writ of habeas corpus.
In the present case, the Department had no part in the negotiations resulting in the plea bargain, and Corley received the benefit of his agreement with the prosecution and the court, in that the court granted him *78 probation on terms applicable to a first, rather than a second, offender.[3] The suspension imposed by the Department is an administrative remedy devised by the Legislature, based on compelling public policy considerations. "The thrust of the legislative concern under Vehicle Code section 13352 remains as it was under prior law: protection of the public from drivers whose prior conduct demonstrates they cannot currently be trusted with a license to drive." (Pollack v. Department of Motor Vehicles, supra, 38 Cal.3d 367, 380-381.) "[A]s the statutory history demonstrates, the Legislature intended license revocation to follow administratively from the record of convictions." (Id. at p. 381, fn. omitted.)
Corley petitioned for a writ of mandate pursuant to section 1085 of the Code of Civil Procedure, which provides that "a writ of mandate `may be issued by any court, except a municipal or justice court, to any inferior tribunal, corporation, board, or person, to compel the performance of an act which the law specifically enjoins, as a duty resulting from an office, trust, or station; or to compel the admission of a party to the use and enjoyment of a right or office to which he is entitled, and from which he is unlawfully precluded by such inferior tribunal, corporation, board or person.' A writ of mandate can therefore [issue only] to compel the Department to perform an act it is under a legal duty to perform. [Citation.]" (Williams v. Department of Motor Vehicles (1969) 2 Cal. App.3d 949, 953 [83 Cal. Rptr. 76].)
Here, although Corley was most recently sentenced as a first offender, he in fact suffered two drunk driving convictions within a seven-year period. The Department has a mandatory duty to suspend his license pursuant to subdivision (a) (3) of Vehicle Code section 13352 (Williams v. Department of Motor Vehicles, supra, 2 Cal. App.3d 953), and absolutely no power or duty to enforce the terms of his plea bargain. A writ of mandamus will not lie to compel the performance of an act where no duty exists. Therefore, the sole remedy available to Corley is withdrawal of his plea. If in fact he is not guilty of the present charge, his exoneration at trial will preclude the Department from suspending his license pursuant to section 13352. In the event of his conviction of the present offense, he may still prove constitutional infirmity, if any, of his prior conviction, which would also preclude the complained of suspension of his license, as the present offense would constitute only a first drunk driving conviction under the statute.


*79 DECISION
The judgment is reversed, and the writ of mandamus issued pursuant thereto is vacated. Appellant to recover costs on appeal.
Croskey, J., and Pounders, J.[*], concurred.
Respondent's petition for review by the Supreme Court was denied September 26, 1990.
NOTES
[1]  Vehicle Code section 13352 provides, in part: "(a) The department shall immediately suspend ... the privilege of any person to operate a motor vehicle upon receipt of a duly certified abstract of the record of any court showing that the person has been convicted of a violation of Section 23152.... For purposes of this section, suspension or revocation shall be as follows: ... (3) Except as provided in Section 13352.5, upon a conviction or finding of a violation of Section 23152 punishable under Section 23165, the privilege shall be suspended for 18 months. The privilege shall not be reinstated until the person gives proof of ability to respond in damages as defined in Section 16430.... (d) A conviction of an offense in any state... which, if committed in this state, would be a violation of Section 23152, is a conviction of Section 23152 for purposes of this section.... The department shall suspend ... the privilege to operate a motor vehicle pursuant to this section upon receiving notice of such a conviction."

Section 23165 provides, in part: "If any person is convicted of a violation of Section 23152 and the offense occurred within seven years of a separate violation of Section ... 23152 ... which resulted in a conviction, that person shall be punished by imprisonment in the county jail for not less than 90 days nor more than one year and by a fine of not less than three hundred ninety dollars ($390) nor more than one thousand dollars ($1,000). The person's privilege to operate a motor vehicle shall be suspended by the Department of Motor Vehicles pursuant to paragraph (3) of subdivision (a) of Section 13352."
[2]  We note that Vehicle Code section 13550 provides for interim suspension effective immediately upon conviction of an offense mandating suspension by the Department, and requires the court in which the conviction is had to confiscate the offender's license for forwarding to the Department.
[3]  We note that the advisement, waiver, and plea form executed by Corley was designed for use only in first offense cases. The form was used in this case because the plea bargain called for Corley's treatment as a first offender. We urge the municipal court to amend the form by adding to it advisements as to the consequences of multiple offenses, in terms similar to those recommended in Pollack v. Department of Motor Vehicles, supra, 38 Cal.3d 367, 381.)
[*]   Assigned by the Chairperson of the Judicial Council.
