
742 So.2d 799 (1998)
Willie James SCOTT, Jr.
v.
STATE.
CR-97-1427.
Court of Criminal Appeals of Alabama.
December 18, 1998.
Opinion on Return to Remand March 26, 1999.
*800 Thomas Goggans, Montgomery, for appellant.
Willie James Scott, Jr., appellant, pro se.
Bill Pryor, atty. gen., and P. David Bjurberg, asst. atty. gen., for appellee.
BASCHAB, Judge.
The appellant, Willie James Scott, Jr., was charged with conspiracy to distribute a controlled substance. During the guilty plea proceedings, the State moved to amend the indictment to charge unlawful distribution of a controlled substance, § 13A-12-211, Ala.Code 1975. The appellant agreed to the amendment and pled guilty to the unlawful distribution of cocaine. Pursuant to a negotiated plea agreement, the trial court sentenced him to imprisonment for eight years.[1] This appeal followed.
The appellant argues that the trial court improperly amended his indictment to charge unlawful distribution. Specifically, he claims that unlawful distribution of a controlled substance cannot be a lesser included offense of conspiracy to distribute a controlled substance. Therefore, he argues that the trial court did not have jurisdiction to accept his guilty plea to an offense not encompassed by the charge in the original indictment. See Johnson v. State, 675 So.2d 85 (Ala.Cr.App.1995) ("[a] trial court lacks jurisdiction to accept a plea of guilty to an offense not encompassed by the charge in the indictment"); Green v. State, 619 So.2d 952 (Ala.Cr.App. 1993) (holding that the appellant could not properly consent to amending an indictment charging burglary to charge an offense that was not a lesser included offense of burglary); Rule 13.5, Ala. R.Crim. P.
*801 Section 13A-1-9(a)(1), Ala.Code 1975, defines an included offense as one that "is established by proof of the same or fewer than all the facts required to establish the commission of the offense charged."
"`Whether a crime constitutes a lesser-included offense is to be determined on a case-by-case basis.' Aucoin v. State, 548 So.2d 1053, 1057 (Ala.Cr.App.1989). `In determining whether one offense is a lesser included offense of the charged offense, the potential relationship of the two offenses must be considered not only in the abstract terms of the defining statutes but must also ... in light of the particular facts of each case.' Ingram v. State, 570 So.2d 835, 837 (Ala. Cr.App.1990) (citing Ex parte Jordan, 486 So.2d 485, 488 (Ala.1986); emphasis in original). See also Farmer v. State, 565 So.2d 1238 (Ala.Cr.App.1990)."
Ford v. State, 612 So.2d 1317, 1318 (Ala. Cr.App.1992).
Section 13A-12-205, Ala.Code 1975, provides that the offense of conspiracy to commit a controlled substance crime is included in any controlled substance crime that is charged. However, nothing in this section prohibits a substantive offense, under the appropriate facts, from being a lesser included offense of a conspiracy charge. Furthermore, conspiracy to commit a controlled substance crime is punished in the same manner as the controlled substance crime that is the object of the conspiracy. § 13A-12-204, Ala.Code 1975. Therefore, in this case, the appellant would be convicted of a Class B felony, regardless of whether he was convicted of conspiracy to commit unlawful distribution or of unlawful distribution itself.
In Ex parte Jordan, 486 So.2d 485 (Ala.1986), the Alabama Supreme Court reversed this court's holding that vehicular homicide could never be a lesser included offense of murder. The supreme court stated:
"The error in this approach is that the court creates a broad rule which fails to take into account the facts of each case. The court considers the potential relationship of the murder and vehicular homicide statutes only in abstract terms and completely ignores the facts of this case and the indictment under which Jordan was charged. We find this application of § 13A-1-9 to these statutes and facts erroneous."
486 So.2d at 488. Based on the language in Ex parte Jordan, it would be inappropriate to say that a substantive controlled substance crime can never, under any facts or circumstances, be an included offense in a charge of conspiracy to commit a controlled substance crime. Rather, the appropriate test would be to determine whether, under the facts of each case, the substantive controlled substance crime could be established by the same or fewer than all of the facts required to establish the commission of criminal conspiracy to commit a controlled substance crime. See § 13A-1-9, Ala.Code 1975.
"A person is guilty of criminal conspiracy to commit a controlled substance crime if he engages in the conduct defined in Section 13A-4-3(a), and the object of the conspiracy is a controlled substance crime." § 13A-12-204, Ala.Code 1975. Section 13A-4-3(a), Ala.Code 1975, provides:
"A person is guilty of criminal conspiracy if, with the intent that conduct constituting an offense be performed, he agrees with one or more persons to engage in or cause the performance of such conduct, and any one or more of such persons does an overt act to effect an objective of the agreement."
"A person commits the crime of unlawful distribution of controlled substances if, except as otherwise authorized, he sells, furnishes, gives away, manufactures, delivers or distributes a controlled substance enumerated in Schedules I through V." § 13A-12-211(a), Ala.Code 1975.
The indictment charged the appellant with conspiring with Jesse Atkins, Jr., to commit the crime of unlawful distribution of cocaine. According to the indictment, the appellant agreed to

*802 "sell, furnish, deliver, or distribute COCAINE to the said JESSE ATKINS JR. in exchange for lawful United States Currency, in order that said JESSE ATKINS JR. could ultimately sell, furnish, deliver, or distribute the said cocaine to AGENT RANDLE FOSHEE, in furtherance of said crime, in violation of Section 13A-4-3, Code of Alabama, 1975."
(C.R. at 6.) After the appellant agreed to the amendment of the indictment and indicated his desire to plead guilty to unlawful distribution of a controlled substance, the following occurred:
"THE COURT: Tell me what you did, sir, that constitutes the offense of sale of controlled substance.
"THE DEFENDANT: I sold seven rocks [of crack cocaine] to an informant.
"THE COURT: To a confidential informant?
"THE DEFENDANT: Yes, sir."
(R. at 21.) From the record before us, we are unable to determine whether the appellant's actions constitute an offense encompassed by the conspiracy indictment or a separate offense altogether. Therefore, we remand this case for the trial court to determine whether, under the facts presented to the grand jury, the appellant's actions constitute an included offense. In making this determination, the trial court shall make specific findings of fact concerning what evidence was presented to the grand jury. If the trial court determines that the appellant's actions constitute an offense included in the offense charged in the indictment, the trial court's order on return to remand shall include a statement to that effect. If the trial court should determine that the events related by the appellant at the guilty plea proceedings constitute a separate offense not encompassed by the indictment, then it shall allow the appellant to withdraw his guilty plea. In the event the appellant is allowed to withdraw his guilty plea, we note that the correct mandatory minimum term of imprisonment under the Habitual Felony Offender Act, § 13A-5-9, Ala.Code 1975, for a person with one prior felony conviction who is convicted of a Class B felony is 10 years, not 8 years as the appellant received under the present plea agreement.
The trial court shall take all necessary action to see that the circuit clerk makes due return to this court at the earliest possible time and within 42 days of the release of this opinion. The return to remand shall include a transcript of the remand proceedings conducted by the trial court and a copy of the trial court's findings of fact.
REMANDED WITH DIRECTIONS.
LONG, P.J., and McMILLAN, COBB, and BROWN, JJ., concur.

On Return to Remand
BASCHAB, Judge.
The appellant, Willie James Scott, Jr., was indicted for conspiracy to distribute a controlled substance. He pled guilty to unlawful distribution of a controlled substance. On December 18, 1998, we remanded this cause for the trial court to determine whether, under the facts presented to the grand jury and the facts presented at the appellant's guilty plea proceeding, unlawful distribution of a controlled substance constituted an offense included in the charge of conspiracy to distribute a controlled substance. On remand, the trial court allowed the appellant to withdraw his guilty plea because it could not conclude that unlawful distribution was encompassed in the offense charged in the indictment. Thus, the appellant has received the relief he sought. Accordingly, we dismiss the appeal.
APPEAL DISMISSED.
LONG, P.J., and McMILLAN, COBB, and FRY, JJ., concur.
NOTES
[1]  In its sentencing order, the trial court found that the appellant had one previous felony conviction. Pursuant to the Habitual Felony Offender Act, § 13A-5-9, Ala.Code 1975, the proper minimum sentence for unlawful distribution of a controlled substance is 10 years. However, because the appellant pled guilty under a plea agreement that provided for an eight-year sentence, he is entitled to specific enforcement of that agreement. See Ex parte Johnson, 669 So.2d 205 (Ala.1995), cert. denied, 516 U.S. 1116, 116 S.Ct. 919, 133 L.Ed.2d 849 (1996).
