
686 So.2d 145 (1996)
STATE of Louisiana
v.
Cedric THOMAS.
No. 95 KW 2348.
Court of Appeal of Louisiana, First Circuit.
December 20, 1996.
Writ Denied March 14, 1997.
*146 Lennie F. Perez, Baton Rouge, for Defendant.
Doug Moreau, District Attorney, Charles Grey, Asst. District Attorney, for State of Louisiana.
Before SHORTESS, LeBLANC and TANNER, JJ.[1]
THOMAS W. TANNER, Judge Pro Tem.
Cedric Thomas was charged by bill of information with possession with intent to distribute cocaine on February 13, 1993, in a drug free zone, a violation of La.R.S. 40:981.3. He pled guilty to the responsive offense of attempted possession with intent to distribute cocaine in a drug free zone, and the court sentenced him to serve a term of nine years imprisonment at hard labor, with "at least" seven and one-half years to be served without benefit of parole, probation, or suspension of sentence, and one-third of the sentence to run consecutively to any other sentence and two-thirds of the sentence to run concurrently with any other sentence. The court also ordered defendant to pay a fine of $5000 and court costs. Defendant filed a timely motion to reconsider sentence, arguing the court should not have imposed the sentence without benefit of parole. Although the court rejected this particular argument, it resentenced defendant to serve a term of seven and one-half years imprisonment at hard labor, without benefit of parole, probation, or suspension of sentence, and with one year to run consecutively to any other sentence. The court made the sentence executory. Defendant objected on the ground the sentence should not have been imposed without benefit of parole. Defendant did not appeal the conviction and sentence. Several months later, he filed a motion to correct illegal sentence and motion to reconsider sentence, in which he again argued the sentence should not have been imposed without benefit of parole. After a hearing which took place before a different judge, the court agreed the sentence was illegal and resentenced defendant to serve a term of seven and one-half years imprisonment at hard labor, with one year to run consecutively to any other sentence and six and one-half years to run concurrently, and with credit for time served. The state objected to the court's failure to impose the sentence without benefit of parole.
The state then filed a writ application with this court seeking review of the decision of the trial court. This court denied the application. 95-2348 (La.App. 1st Cir. 4/11/96). The state sought review with the Supreme Court; and the Supreme Court granted the writ and remanded the matter to this court for full briefing, argument, and opinion. 96-1145 (La.6/7/96), 674 So.2d 986.
Before considering the merits of the state's argument, we will consider if the state should be barred from seeking review because of its failure to file or make a motion to reconsider sentence. According to article 881.1(D) of the Code of Criminal Procedure, *147 the state is precluded from raising an objection to a sentence on appeal or review if it fails to make or file a motion to reconsider sentence. However, article 881.2(B) allows the state to appeal or seek review of a sentence if the sentence imposed was not in conformity with a mandatory sentence provision and "the state objected at the time the sentence was imposed or made or filed a motion to reconsider sentence...." (Emphasis added.) Thus, either a contemporary objection or a motion to reconsider sentence will preserve the state's right to seek review of such an error. See State v. Bagneris, 93-2454, p. 3 (La.App. 4th Cir. 2/25/94), 633 So.2d 835, 836. In the instant case, although the state did not file a motion to reconsider sentence after the final resentencing, the state opposed defendant's motion to correct illegal sentence and the state objected to the court's decision to grant the motion and objected to the sentence imposed on the ground raised in this writ application. Thus, the state preserved the issue for review. See State v. Aggison, 628 So.2d 1115 (La.1993).
In the writ application, the state argues the court erred when it resentenced defendant because La.R.S. 40:981.3, the "drug free zone" statute, prohibits the granting of parole, probation, or suspension of sentence during the minimum term of imprisonment. In response, defendant contends that, because no minimum term is mandated under the attempt statute and parole eligibility is denied only on the minimum term, the court cannot deny parole eligibility.
The drug free zone statute, La.R.S. 40:981.3, is a substantive criminal statute rather than a sentencing enhancement statute. State v. Wright, 95-377, pp. 7-8 (La. App. 3d Cir. 11/8/95), 664 So.2d 712, 716. The statute establishes a crime and penalties for felony violations of La.R.S. 40:966 through 40:970 when the offense occurs on "property used for school purposes by any school, within one thousand feet of any such property, or while on a school bus...." The statute provides in pertinent part:
A. Any person who violates a felony provision of R.S. 40:966 through R.S. 40:970 of the Uniform Controlled Dangerous Substances Law while on any property used for school purposes by any school ... shall, upon conviction, be punished in accordance with Subsection E.
* * * * * *
E. (1) On a first conviction, whoever violates a provision of this Section shall be punished by the imposition of the maximum fine and not less than one-half nor more than the maximum term of imprisonment authorized by the applicable provisions of R.S. 40:966 through R.S. 40:970, with the minimum mandatory term of imprisonment being served without benefit of parole, probation, or suspension of sentence, provided in no case shall the term of imprisonment be less than the minimum term provided in R.S. 40:966 through R.S. 40:970.
* * * * * *
(Emphasis added; prior to renumbering of Subsection (A) by Acts 1994, 3rd Ex.Sess. No. 46, § 1.)
Under the Uniform Controlled Dangerous Substances Law, it is illegal to knowingly or intentionally possess with intent to distribute cocaine. La.R.S. 40:967(A)(1). See also La. R.S. 40:964, Schedule II (A)(4). The penalty for possession with intent to distribute cocaine (when it does not occur in a drug free zone) is imprisonment at hard labor for not less than five years and not more than thirty years. In addition, the court may impose a fine, which, on the date of the instant offense, was no more than fifteen thousand dollars. La.R.S. 40:967(B)(1) (prior to amendment by Acts 1993 La.Acts No. 969, § 1). See also La.R.S. 40:961(26) (definition of "narcotic drug").
In its argument both before the trial court and this court, the state relies on La.R.S. 40:979 as the penalty provision for defendant's plea to an attempt. Under this statute, the attempt to commit a violation of the Uniform Controlled Dangerous Substances Law is punishable as follows:
Except as otherwise provided herein, any person who attempts or conspires to commit any offense denounced and or made unlawful by the provisions of this Part [La.R.S. 40:961 through 40:995] shall, *148 upon conviction, be fined or imprisoned in the same manner as for the offense planned or attempted, but such fine or imprisonment shall not exceed, one-half of the punishment prescribed for the offense, the commission of which was the object of the attempt or conspiracy.
La.R.S. 40:979(A) (emphasis added).
Defendant argues there is no minimum mandatory term for an attempt and, thus, the provision of the drug free zone statute which specifies that the "minimum mandatory term of imprisonment" is served without benefit of parole has no application. However, the phrase "minimum mandatory term of imprisonment," contained in La.R.S. 40:981.3(E)(1), refers to the minimum term required by the drug free zone statute and not to a minimum term required by the attempt statute or by any other statute. See State v. Thornton, 94-1470, pp. 12-13 (La. App. 1st Cir. 10/6/95), 671 So.2d 481, 488-89.
We also reject defendant's argument that there is no minimum term of imprisonment under La.R.S. 40:979, the penalty provision for attempt contained in the Uniform Controlled Dangerous Substances Law. In State v. Chatman, 599 So.2d 335, 348 (La.App. 1st Cir.1992), this court calculated the penalty for attempted distribution of cocaine (which is the same as for attempted possession with intent to distribute cocaine) to be imprisonment for a minimum of 2½ years and a maximum of 15 years and a possible fine of not more than $7,500. In doing so, we relied on 40:979 as the applicable penalty provision. Similar results were reached in State v. Williams, 588 So.2d 1239, 1243 (La.App. 1st Cir.1991), writ denied, 592 So.2d 1333 (La. 1992), and State v. Laprime, 521 So.2d 538, 540 (La.App. 4th Cir.), writ denied, 524 So.2d 517 (La.1988).
The attempt to possess with intent to distribute cocaine in a drug free zone is punishable under either La.R.S. 40:979(A) or 14:27(D), and the state may choose either provision as the basis for the prosecution. See State v. O'Blanc, 346 So.2d 686, 690 (La.1977). In State v. Callahan, 95-1331 (La. 3/29/96), 671 So.2d 903 (per curiam), the Supreme Court said there is no minimum sentence for the crime of attempted possession with intent to distribute marijuana. However, in doing so, the court applied the penalty provision of 14:27 rather than 40:979. Different language concerning the penalty for an attempt is contained in La.R.S. 14:27(D)(3): "fined or imprisoned or both, in the same manner as for the offense attempted; such fine or imprisonment shall not exceed one-half of the largest fine, or one-half of the longest term of imprisonment prescribed for the offense so attempted, or both." Although the language of La.R.S. 14:27 supports the court's decision in Callahan, in the instant case the state relied on 40:979 and the language of 40:979 ("shall not exceed one-half of the punishment prescribed for the offense") supports a different interpretation.
At the time of the instant offense, the penalty for a first conviction for the completed crime of possession with intent to distribute cocaine in a drug free zone was a mandatory fine of $15,000 and imprisonment of not less than 15 years and not more than 30 years, with 15 years of the sentence to be without benefit of parole, probation, or suspension of sentence. La.R.S. 40:967(B)(1) & 40:981.3(E)(1). Following our decision in Chatman, and applying the penalty provided for in La.R.S. 40:979, the penalty for defendant's conviction for attempted possession with intent to distribute; cocaine in a drug free zone is a fine of not more than $7,500 and imprisonment for not less than seven and one-half years and not more than fifteen years, with seven and one-half years to be served without benefit of parole, probation, or suspension of sentence. Thus, the second sentence imposed by the trial court was not illegal; and the court erred when it granted the motion to correct illegal sentence and resentenced defendant without restricting parole eligibility.
Although an illegal sentence may be corrected at any time by the court that imposed the sentence, see La.Code Crim.P. art. 882, in felony cases in which the defendant has been sentenced to imprisonment with hard labor, the court may not amend or change a sentence which is legal after commencement of execution of the sentence. See La.Code Crim.P. art. 881. Accordingly, the court was *149 without authority when it sentenced defendant for a third time and removed the restriction on parole eligibility. See State v. Slaid, 614 So.2d 1326, 1330-31 (La.App. 3d Cir.1993). We grant the state's writ, vacate the trial court's ruling which granted the motion to correct illegal sentence, reinstate the second sentence (imposed on June 7, 1994), and remand to allow the court to revise the commitment to reflect the reinstated sentence.
Insofar as the second sentence is concerned, we note the court did not vacate the original sentence before sentencing defendant on the second occasion. Although it is apparent from the court's actions that it intended to vacate the original sentence, out of an abundance of caution we vacate the first sentence. We also notice the court failed to credit defendant with time served as required by La.Code Crim.P. art. 880. Accordingly, we amend the sentence to reflect that defendant is to be given credit for any time served prior to execution of his sentence. See State v. Greer, 572 So.2d 1166, 1172 (La.App. 1st Cir.1990). Resentencing is not required. However, on remand the court should amend the commitment and the minute entry of the sentencing to show defendant is to be given credit for time served.
WRIT GRANTED; SENTENCE VACATED; SENTENCE OF JUNE 7, 1994, REINSTATED; REMANDED WITH ORDER.
SHORTESS, J., concurs.
NOTES
[1]  Judge Thomas W. Tanner, retired, is serving as judge pro tempore by special appointment of the Louisiana Supreme Court.
