
406 So.2d 986 (1981)
Jerry SHOEMAKER, Director, Alabama Department of Public Safety
v.
Clifford Lafayette ATCHISON.
Civ. 2935.
Court of Civil Appeals of Alabama.
November 12, 1981.
Charles A. Graddick, Atty. Gen., and Jack M. Curtis, Asst. Atty. Gen., for appellant.
L. Scott Atkins, Centreville, for appellee.
WRIGHT, Presiding Judge.
The Director of the Alabama Department of Public Safety appeals from the issuance of a writ of mandamus which ordered him to vacate the revocation of Mr. Atchison's driver's license.
On March 25, 1981, Mr. Atchison was arrested within the police jurisdiction of Centreville, Alabama, and charged with Driving While Intoxicated, a violation of a municipal ordinance. On April 21, 1981, he entered a plea of guilty in the municipal court. Apparently after reviewing the Alabama Rules of the Road Act, the municipal court judge determined that the April 21, 1981 conviction was a "first conviction" under the law and declined to order revocation of Mr. Atchison's driver's license. It is undisputed *987 that on August 17, 1977, Mr. Atchison was convicted for Driving While Intoxicated (DWI) within the State of Alabama. Mr. Atchison was notified on June 3, 1981, by the Director of the Department of Public Safety that his license was revoked for a six-month period to begin on June 18, 1981. On June 17, 1981, Mr. Atchison petitioned the Montgomery County Circuit Court for a writ of mandamus to order the Director to vacate the revocation order. The Director appeals from the issuance of the writ.
In determining the propriety of the issuance of the writ, the question presented on appeal is whether the motor vehicle laws of this state providing for the revocation of a driver's license, preclude the Director from considering DWI convictions occurring prior to August 17, 1980.
The Alabama Rules of the Road Act (Act No. 80-434, Acts of Alabama 1980) became effective on August 17, 1980. The provision dealing with the cancellation, suspension or revocation of driver's licenses was amended, effective May 27, 1981. Section 32-5A-195, Code (1975) provides in pertinent part:
(j) The director of public safety shall forthwith revoke the license of any driver upon receiving a record of such driver's conviction of any of the following offenses:
(2) Upon a first conviction of driving or being in actual physical control of any vehicle while under the influence of alcohol or under the influence of a controlled substance to a degree which renders him incapable of safely driving or under the combined influence of alcohol and a controlled substance to a degree which renders him incapable of safely driving, such revocation shall take place only when ordered by the court rendering such conviction;
(3) Upon a second or subsequent conviction within a five-year period, of driving or being in actual physical control of any vehicle while under the influence of alcohol or under the influence of a controlled substance to a degree which renders him incapable of safely driving or under the combined influence of alcohol and a controlled substance to a degree which renders him incapable of safely driving.
Section 32-5A-12, Code (1975) provides:
This chapter shall not have a retroactive effect and shall not apply to any traffic accident, to any cause of action arising out of a traffic accident or judgment arising therefrom, or to any violation of the motor vehicle laws of this state, occurring prior to August 17, 1980.
Mr. Atchison asserts that § 32-5A-195(j)(3), providing for mandatory revocation for a second conviction within a five-year period, is limited by § 32-5A-12. It is his contention that considering the August 17, 1977 conviction would, in effect, be a retroactive application of § 32-5A-195(j)(3). We cannot agree.
Section 32-5A-191 deals with driving while under the influence of alcohol or controlled substances. The comments thereto show the legislative intent underlying mandatory revocation for second and subsequent convictions. Prior law made no distinction between first and subsequent convictions. In many instances DWI charges were reduced to lesser offenses to avoid the harsh penalty of revocation for a one-time offender. Consequently, the true problem drinking driver might have an officially clear record insofar as DWI convictions. The comments continue: "[F]or it is thought that once the problem drinking driver is identified by one DWI conviction, then prosecutors and judges will be less willing to be lenient and, it is hoped, more solicitous of the welfare of the public."
A construction of the new law which in effect "wipes the slate clean" would be in contradiction to the obvious legislative purpose. Such construction would make everyone not previously convicted under the new law a first offender. It is the duty of the court in cases of statutory construction to give effect to the intent of the legislature. Hilyer v. Dixon, 373 So.2d 1123 (Ala.Civ.App.), cert. denied, 373 So.2d 1125 (Ala.1979). We will look not only to the language of the statute, but to *988 its purpose and object as well. McCullough v. State ex rel. Burrell, 352 So.2d 1121 (Ala.1977).
In the case before us, Atchison was prosecuted under the new law for a violation occurring subsequent to its enactment. That the penalty is increased because of a prior conviction occurring before enactment of the statute, is not a retroactive application of it. See Gryger v. Burke, 334 U.S. 728, 68 S.Ct. 1256, 92 L.Ed. 1683 (1948). In Wilson v. State, 371 So.2d 932, 940 (Ala.Cr. App.1978), aff'd, 371 So.2d 943 (Ala.1979), the court stated: "[I]n order to authorize the infliction of a more severe penalty on conviction for a second or subsequent offense, it is not necessary that the first conviction, or other prior convictions relied on, should have occurred subsequent to the enactment of the statute. [Citation omitted]."
We hold that under § 32-5A-195(j)(3) the Director's revocation of Mr. Atchison's driver's license was mandatory. Mr. Atchison was not entitled to the writ of mandamus awarded by the trial court. We therefore must reverse the judgment to that effect and direct the circuit court to enter judgment denying the petition and dismissing the cause.
REVERSED AND REMANDED WITH DIRECTION.
BRADLEY and HOLMES, JJ., concur.
