
671 So.2d 125 (1995)
Steven Wayne HARRIS
v.
STATE.
CR-94-0573.
Court of Criminal Appeals of Alabama.
July 28, 1995.
Rehearing Denied September 8, 1995.
Certiorari Denied November 17, 1995.
J. Robert Bentley, Oneonta, for appellant.
Jeff Sessions, Atty. Gen., and Thomas Leverette, Asst. Atty. Gen., for appellee.
Alabama Supreme Court 1941941.
TAYLOR, Presiding Judge.
The appellant, Steven Wayne Harris, pleaded guilty to murder made capital because the murder occurred during the course of a robbery, a violation of § 13A-5-40(a)(2), Code of Alabama 1975. Pursuant to § 13A-5-42, a jury trial was held in order that the state would present evidence to prove the appellant's guilt beyond a reasonable doubt. The jury returned a verdict of guilty, and the appellant was sentenced to life imprisonment without parole. Section 13A-5-42 reads in part: "A defendant who is indicted for a capital offense may plead guilty to it, but the state must in any event prove the defendant's guilt of the capital offense beyond a reasonable doubt to a jury. The guilty plea may be considered in determining whether the state has met that burden of proof. The guilty plea shall have the effect of waiving all non-jurisdictional defects in the proceeding resulting in the conviction except the sufficiency of the evidence."
(Emphasis added.) Two issues are presented on appeal.

I
The appellant contends that the evidence was insufficient to prove that he was guilty of capital murder. Specifically, he asserts that the intent to commit the robbery was not contemporaneous with the murder, but that the robbery occurred as an afterthought.
The appellant pleaded guilty to an indictment that charged him with committing murder *126 in the course of a robbery. The state presented evidence to the jury that the appellant waited until the victim was asleep and then shot him in the head nine times. The appellant then proceeded to take jewelry, a gun, and electronic equipment from the victim's home. The appellant also drove away in the victim's 1991 Cadillac automobile. Michael Higgins, an acquaintance of the appellant's, testified that the appellant declared a few days before the murder that he intended to kill the victim and to take from the victim anything that could be converted into money.
It is sometimes said that a robbery committed as a "mere afterthought" and unrelated to the murder will not sustain a conviction for the capital offense of murder-robbery. Connolly v. State, 500 So.2d 57 (Ala.Cr.App.1985), aff'd, 500 So.2d 68 (Ala. 1986). However, the appellant's intent to rob the victim may lawfully and correctly be inferred where the killing and the robbery were part of a continuous chain of events. Hallford v. State, 548 So.2d 526 (Ala.Cr.App. 1988), aff'd, 548 So.2d 547 (Ala.), cert. denied, 493 U.S. 945, 110 S.Ct. 354, 107 L.Ed.2d 342 (1989). Viewing the evidence in the light most favorable to the state, we conclude that a jury could well have found beyond a reasonable doubt that the robbery was related to the murder, and that the appellant intended to rob the victim when the murder occurred.

II
The appellant also contends that he was entitled to have the jury instructed on the lesser included offense of murder. However, the record reflects that this matter was not preserved for our review and that the trial court had no opportunity to address the matter now presented for our consideration. See Cook v. State, 637 So.2d 229 (Ala.Cr.App. 1994); Rule 21.2, Ala.R.Crim.P.
AFFIRMED.
All the Judges concur.
