
475 So.2d 637 (1985)
David PICKENS
v.
STATE.
2 Div. 460.
Court of Criminal Appeals of Alabama.
March 12, 1985.
On Return to Remand August 20, 1985.
*638 Ralph L. Liverman, Eutaw, for appellant.
Charles A. Graddick, Atty. Gen., and J. Anthony McLain and James F. Hampton, Sp. Asst. Attys. Gen., for appellee.
TYSON, Judge.
David Pickens was indicted for assault in the first degree in violation of § 13A-6-20, Code of Alabama 1975. The jury found the appellant "guilty as charged in the indictment" and the trial judge sentenced the appellant to life imprisonment in the penitentiary.
The only issues raised by the appellant on appeal concern the appellant's sentence in this cause and, therefore, we omit a discussion of the facts of this case. After reviewing the record and finding no errors harmful to the appellant during the trial of this case, we hereby affirm his conviction for assault in the first degree.
We must look to the sentence hearing to determine if the appellant was properly sentenced.

I
Following the trial of this case, the State filed a notice of intention to treat the appellant as a Habitual Felony Offender. At the sentencing hearing, the State introduced records of three youthful offender adjudications of the appellant and these were admitted into evidence. The State also brought to the attention of the trial judge that the appellant had admitted two prior federal felony convictions during the course of the trial itself but offered no records of these convictions. Defense counsel properly objected to the admission of both of these matters.
After these objections had been made, the following occurred:
"THE COURT: Today is the day set for your sentencing. You have previously been found guilty by a jury of assault in the first degree, which is a class B felony. The State has introduced evidence that you were previously convicted in Circuit Court of being a youthful offender with an underlying charge of grand larceny. The indictment in case 1588-A charges you with feloniously taking and carrying away a cow, the personal property of H.W. White, Jr., and you were found guilty of that offense. In case 1587-A the indictment charges you with taking and carrying away two cows of Howard Brown, and you were convicted of being a youthful offender with the underlying charge of grand larceny. In case 1589-A the indictment charges you with feloniously taking and carrying away a cow of Willie Atkins, and you were convicted of being a youthful offender. You were sentenced in each of those cases, and the sentences in each one of those cases was youthful offender status.
"Now, the Court finds that those three offensesthat is, being grand larceny are felonies in the State of Alabama. The Court further finds, based on the testimony that was presented in the trial of this case, that you were convicted in Federal court of a felony on two occasions, one being in 1976. You were charged, I believe, with possession of untaxed spirits, whiskey. You were charged also in Federal court in 1983 with possession of fire arms after being convicted of a crime.
"Based on the fact that you have been convicted of felonies previous to your conviction in this casemore than two felonies previous to this casethe Court finds that you are an habitual offender under the laws of the State of Alabama. Since you were convicted of a class B felony and you have more *639 than two prior felony convictionsthat is, there are three or more prior felony convictionsit is my obligation and I must sentence you to life imprisonment in the penitentiary. Under the habitual offender statute of the State of Alabama, if you have three prior convictions and you are convicted of a class B felony, the sentence is enhanced to life imprisonment in the penitentiary.

"Do you have anything to say before I impose sentence of law on you?
"THE DEFENDANT: No.
"THE COURT: It is the order and judgment of this Court that you are an habitual offender. The Court finds beyond a reasonable doubt that you are an habitual offender, having been convicted of three prior felonies that I have enumerated, two in Federal court. It is the order and judgment of this Court you are hereby ordered to serve life imprisonment. Remanded to the custody of the sheriff." (R. 129-131). (Emphasis added).
It seems clear to this court that the trial judge considered the appellant's prior youthful offender adjudications and his prior federal felony convictions in imposing sentence under the Habitual Felony Offender Act. We must now determine if sentence was properly imposed by the trial judge's consideration of the youthful offender adjudications and the federal felony convictions.

A
The appellant contends the trial judge improperly used his prior youthful offender adjudications to impose sentence under the Habitual Felony Offender Act. We must agree.
The Alabama Supreme Court in Ex Parte Thomas, 435 So.2d 1324 (Ala.1982) held that:
"... [A] prior youthful offender adjudication is properly considered in determining the sentence to be imposed within the statutory range for a later crime for which the defendant has been convicted. That same youthful offender determination, however, may not be considered a prior felony conviction, as contemplated by the Habitual Offender Act, so as to bring the defendant within the purview of the higher sentence categories of that Act."
435 So.2d at 1326. See also Thomas v. State, 445 So.2d 992 (Ala.Crim.App.1984).
Youthful offender adjudications are not to be considered prior convictions when sentence is imposed under the provisions of the Habitual Felony Offender Act. Therefore, the trial judge erred by considering these matters when he imposed sentence upon this appellant.

B
The appellant argues that the trial judge improperly considered his two prior federal felony convictions in imposing sentence under the Habitual Felony Offender Act because the State failed to affirmatively establish that he was represented by counsel in those two cases. This contention is without merit. The appellant admitted those two convictions and, therefore, the State did not have to offer proof that he was represented by counsel in those two cases.
"`In our opinion, when a defendant through his own counsel, freely admits his conviction of a crime, unless he qualifies his admission, he admits all of the ingredients needed to prove the conviction of the crime...
`...
`By his act of admitting the prior conviction, we think the defendant relieved the State from the burden of proving any of the matters that ordinarily would attend establishing the prior conviction.
`...
`Were it otherwise, an admission of prior conviction, made with undisclosed qualifications, would result in the nullification of the admission. The action would be pointless, unless designed to ensnare the opposition, which proposition we do not entertain in this case. We think there is *640 a difference between there being a deficiency in the required preliminary proof as a foundation for the introduction of a certified copy of a record of conviction, as where the record is silent as to the presence of legal counsel, and an admission by the defendant of the fact of his prior conviction. The admission would seem to us to supply all of the necessary requirements for this area of proof in the case.' Donahay, 287 Ala. (716) at 719-19, 255 So.2d 599 (emphasis added).
`See also Douglas v. State, 406 So.2d 1051, 1052 (Ala.Cr.App.), cert. denied, Ex parte Douglas, 406 So.2d 1053 (Ala. 1981); Thompson v. State, 405 So.2d 717, 720 (Ala.Cr.App.), cert. denied, Ex parte Thompson, 405 So.2d 721 (Ala. 1981); Moseley v. State, 398 So.2d 357, 359 (Ala.Cr.App.), cert. denied, Ex parte Moseley, 398 So.2d 359 (Ala.1981).'"
Nilson v. State, 412 So.2d 1262, 1263-64 (Ala.Crim.App.1982).
Therefore, we find that the trial court properly considered these two prior convictions in imposing sentence.

II
Since we have held that only the appellant's two prior federal felony convictions should have been considered by the trial judge in imposing sentence under the Habitual Felony Offender Act, we must now determine whether the appellant was properly sentenced.
The proper range of punishment for a person who is convicted of a Class B felony and has two prior felony convictions is "imprisonment for life or for any term of not more than 99 years but not less than 15 years." Ala.Code § 13A-5-9(b)(2) (1975).
The State contends that since the appellant's life sentence was within the allowable range of punishment, his sentence should stand. We cannot agree with this argument.
The Alabama Supreme Court held in Ex Parte Thomas, supra, [agreeing with Judge Bowen's dissent in Thomas v. State, 435 So.2d 1319 (Ala.Crim.App.1981)] that merely because a trial judge could have sentenced a defendant to a particular sentence does not necessarily mean that he would have imposed that particular sentence had he not considered improper matters.
In the case at bar, the trial judge stated that he "must" sentence the appellant to life imprisonment because he had three or more prior felony convictions.
Our finding that the trial judge should have only considered the appellant's two prior federal felony convictions leads us to the conclusion that the trial judge was not required to sentence the appellant to life imprisonment. In fact, there is a broad range of possible sentences which could be imposed upon this appellant.
Therefore, the appellant's sentence is hereby vacated and this cause is remanded to the trial court for a new sentencing hearing to be held in accordance with this opinion. A proper return shall be filed with this court showing the new sentence.
REMANDED WITH DIRECTIONS.
All the Judges concur.
TYSON, Judge.
On March 12, 1985 this court remanded this cause with directions that a new sentencing hearing be held.
The basis of our earlier ruling was that, while the trial court properly considered the appellant's two prior federal felony convictions in imposing sentence, it should not have considered the appellant's prior youthful offender adjudication as such should not be used when setting a sentence under the Habitual Felony Offender Act. Ex Parte Thomas, 435 So.2d 1324 (Ala.1982) and Thomas v. State, 445 So.2d 992 (Ala. Crim.App.1984).
Our court directed that the appellant's sentence of life imprisonment be set aside but that trial court set sentence within the statutory period of "not more than 99 years but not less than 15 years", Alabama *641 Code § 13A-5-9(b)(2) (1975), as a Class B felony.
The trial court has now filed a return showing the sentence now imposed to be 20 years' imprisonment.
On the basis of this return, this cause is due to be and the same is, hereby, affirmed.
AFFIRMED.
All the Judges concur.
