Defendant was charged with violation of LSA-R.S. 40:967 in that he did knowingly and intentionally distribute a controlled dangerous substance: to wit, cocaine. By means of a plea bargain, the charge was reduced to attempted possession. In accordance with the agreement defendant was sentenced to serve two and a half years at hard labor with the Department of Corrections. Defendant has appealed.
He makes one assignment of error, contending only that the sentence is excessive.
Details of the crime and subsequent arrest are not reflected in portions of the record designated by defendant in connection with this appeal. However, the record does contain an order for bail or appearance bond in the sum of $5,000 to be fixed for defendant who was being held on the charge of two counts of possession and two counts of distribution of cocaine, prior to his plea bargain.
Defendant contends the trial court did not consider any of the guidelines for sentencing as provided by LSA-C.Cr.P. art. 894.1, since the record contains no reasons or factual basis for the sentence.
We find no merit in this contention.
On a form entitled DEFENDANT’S AC-KNOWLEDGEMENT OF CONSTITUTIONAL RIGHTS AND WAIVER OF RIGHTS ON ENTRY OF A PLEA OF GUILTY, which defendant signed, one of the questions asked was:
“Have you been advised by your counsel that in the event I accept your plea of guilty, that you will be sentenced as follows:
“2½ YEARS IN DEPARTMENT OF CORRECTIONS — THE STATE WILL DISMISS THE OTHER COUNT No. 85-1624.”
Additionally, during the proceedings the following exchange took place:
“MR. O’NEILL:
“Your Honor, in the matter of 85-1574, I am Philip O’Neill. I represent Billy Sclafini, who is before the Court. At this time, we withdraw his former plea of not guilty in matter 85-1574 and tender to the State a plea of guilty to attempted possession of cocaine.
“MR. CONNICK:
“The plea is acceptable to the State; and the State will dismiss matter 85-1624 pending against the defendant.”
Also the trial court judge in open court stated:
“THE COURT:
“Mr. Sclafini, in connection with this matter, do you understand the Court could sentence you up to two and a half years at hard labor and will sentence you to two and a half years at hard labor. Do you understand that?
“THE WITNESS:
“Yes.
“THE COURT:
“Do you make the plea freely and voluntarily, Mr. Sclafini?
“THE WITNESS:
“Yes, sir.
******
“THE COURT:
“Do you understand, you make the plea to avoid a heavier sentence in another matter * * * ?”
Thus it is established that defendant pleaded guilty to a lesser charge knowing he was reducing his criminal exposure from violation of R.S. 40:967, for which he could *386have received a sentence of imprisonment for not less than five years or more than 30 years, with a possible fine of up to $30,000.
As a result of the plea bargain, the district attorney dropped one of the charges and reduced the other to the far less serious offense of attempted possession. In return defendant received a substantially lesser sentence.
It is settled that an accused cannot complain of the excessiveness of a sentence imposed under a plea bargain to which he, the district attorney and the judge have agreed. State v. Shea, 421 So.2d 200 (La.1982).
For the reasons assigned the conviction and sentence of Billy M. Sclafini are affirmed.
AFFIRMED.