¶1Defendant, convicted and sentenced concurrently for possession with intent to dis*457tribute and simple possession, claims double jeopardy violation.
¶2Facts
¶3Reginald Groves (defendant) is a Kansas City, Missouri resident. In November of 1989, a confidential informant told Sioux Falls police that defendant and his girlfriend had been making trips from Kansas City to Sioux Falls to sell crack cocaine, and that they were expected at a certain house on Dakota Avenue on Friday, November 10. After corroborating that defendant and his girlfriend were regular visitors to Sioux Falls and that they were in town that day, police put them under surveillance.
¶4Around 11:00 p.m. their car and one or two other vehicles pulled up at the house on Dakota Avenue. After the occupants had been inside the house a few minutes, police communicated with the confidential informant who told them that defendant and his girlfriend had arrived and that they had brought with them cocaine for sale. Shortly thereafter, one of the vehicles in front of the house drove away and police pulled it over. A consent search turned up cocaine, marijuana and drug paraphernalia. The driver, one Willie Harris, was arrested.
¶5Police then entered the house on Dakota Avenue with the permission of the owners. Defendant was downstairs with others. One of the owners of the house told police that defendant and his girlfriend had been in an upstairs bedroom earlier selling cocaine to Harris. A search of defendant revealed two rocks of cocaine concealed in his jacket, a loaded .25 caliber automatic pistol in a box inside his jacket, ammunition and $426 in cash.
¶6On November 16, 1989, defendant was indicted by a Minnehaha County Grand Jury on three counts:
Count I: possession of cocaine with intent to distribute in violation of SDCL 22-42-2.
Count II: simple possession of cocaine in violation of SDCL 22-42-5.
Count III: committing a felony while armed with a firearm in violation of SDCL 22-14-12.
¶7At a plea hearing held April 23, 1990, defendant knowingly and voluntarily pled guilty to Counts I and II as part of a plea bargain in exchange for dropping Count III and concurrent sentences on Counts I and II.
¶8At a sentencing hearing held June 25, 1990, defendant refused the court’s final offer to change his guilty pleas and reaffirmed that both pleas were made voluntarily and knowingly. The court found a factual basis for accepting the guilty pleas on Counts I and II. The court sentenced defendant to two prison terms of three years on Counts I and II, to be served concurrently.
¶9Four days later, defendant filed a motion to correct sentence asking the court to vacate defendant’s concurrent three-year sentences on Counts I and II and to impose instead a single three-year sentence on Count I only, on the grounds that “simple possession” is a necessarily included offense within “possession with intent to distribute.” The circuit court denied the motion to replace the concurrent sentences with a single sentence.
¶10The primary issue is whether multiple convictions and sentences for possession with intent to distribute and simple possession violate the Double Jeopardy Clause of the state and federal constitutions. A secondary issue is whether defendant waived his appeal on this issue by pleading guilty to both counts.
¶11Double Jeopardy
¶12No person shall “be subject for the same offense to be twice put in jeopardy of life or limb[.]” U.S. Const, amend. V. See also S.D. Const, art. VI, § 9. Not only does this Double Jeopardy Clause “prohibit[] successive prosecutions for the same criminal act,” Grady v. Corbin, 495 U.S. -, -, 110 S.Ct. 2084, 2087, 109 L.Ed.2d 548, 557 (1990) (emphasis added), it also “protects against multiple punishments for the same offense” in a single prosecution. North Carolina v. Pearce, 395 U.S. 711, 717, 89 S.Ct. 2072, 2076, 23 L.Ed.2d 656 (1969) (footnote omitted).
¶13*458If a defendant is convicted and punished twice for the same act, the court exceeds the maximum sanction provided by the legislature and the only acceptable remedy is to vacate one of the underlying convictions. Ball v. United States, 470 U.S. 856, 864, 105 S.Ct. 1668, 1673, 84 L.Ed.2d 740 (1985). “The remedy of ordering one of the sentences to be served concurrently with the other” is not good enough. Id.“The second conviction ... does not evaporate simply because of the concurrence of the sentence.” 470 U.S. at 864-865, 105 S.Ct. at 1673.
¶14The pivotal question is what constitutes the “same offense” for double jeopardy purposes. In Blockburger v. United States, 284 U.S. 299, 304, 52 S.Ct. 180, 182, 76 L.Ed. 306 (1932), the United States Supreme Court held that
where the same act or transaction constitutes a violation of two distinct statutory provisions, the test to be applied to determine whether there are two offenses or only one, is whether each provision requires proof of an additional fact which the other does not. (Citation omitted).
¶15The Blockburgertest is strictly a statutory comparison test because it “focuses on the proof necessary to prove the statutory elements of each offense, rather than on the actual evidence to be presented at trial.” Illinois v. Vitale, 447 U.S. 410, 416, 100 S.Ct. 2260, 2265, 65 L.Ed.2d 228 (1980). South Dakota has adopted the Blockburgertest for double jeopardy purposes. State v. Hoffman, 430 N.W.2d 910, 911 (S.D.1988); State v. Pickering, 88 S.D. 548, 225 N.W.2d 98, 100-101 (1975).
¶16“[A] subsequent prosecution must do more than merely survive the Blockburger test.” Grady v. Corbin, 495 U.S. at -, 110 S.Ct. at 2093, 109 L.Ed.2d at 564 (emphasis added). Successive prosecutions under two statutes are barred by the Double Jeopardy Clause not only when the elements of the two statutes are the same, but also when “to establish an essential element of an offense charged in [the subsequent] prosecution, the government will prove conduct that constitutes an offense for which the defendant has already been prosecuted.” 495 U.S. at -, 110 S.Ct. at 2087,109 L.Ed.2d at 557 (footnote omitted).
¶17However, in the context of multiple punishments imposed in a single prosecution, the Blockburgertest of statutory comparison is still the rule for determining whether the defendant is being punished for one or two offenses. Grady v. Corbin, 495 U.S. at - - -, 110 S.Ct. at 2090-2091, 109 L.Ed.2d at 561-562. The reason for this is that in the single prosecution context, the sole interest of the Double Jeopardy Clause is to “prevent the sentencing court from prescribing greater punishment than the legislature intended." Missouri v. Hunter, 459 U.S. 359, 366, 103 S.Ct. 673, 678, 74 L.Ed.2d 535 (1983). Accord Jones v. Thomas, 491 U.S. 376, 381, 109 S.Ct. 2522, 2525, 105 L.Ed.2d 322 (1989); United States v. Halper, 490 U.S. 435, 450, 109 S.Ct. 1892, 1903, 104 L.Ed.2d 487 (1989).
¶18Defendant was convicted of possession with intent to distribute in violation of SDCL 22-42-2
¶19This court has already held that simple possession is not a lesser included offense within distribution of a controlled substance under SDCL ch. 22-42. State v. Goodroad, 455 N.W.2d 591, 593 (S.D.1990); State v. Oien, 302 N.W.2d 807, 809 (S.D.1981). The dispositive question is whether simple possession is a lesser included offense within possession with intent to distribute under SDCL 22-42-2.
¶20Applying the Blockburgerstatutory comparison test, simple possession under SDCL 22-42-5 requires that the controlled substance was not “obtained directly or pursuant to a valid prescription or order from a practitioner[.]” In contrast, possession with intent to distribute under SDCL 22-42-2 does not require that the controlled substance be possessed illegally. A person possessing a controlled substance legally, while intending to distribute it illegally, would violate SDCL 22-42-2, but would not violate SDCL 22-42-5. Thus, under the Blockburgertest, violations of the two statutes do not constitute the “same offense” and conviction and punishment for violating both statutes in a single prosecution does not violate the Double Jeopardy Clause.
¶21The facts in this case support this result. Defendant pled guilty to possession with intent to distribute and, as his counsel remarked at the June 25, 1990 sentencing hearing, “the State’s version of proof ... does show that [defendant] had an involvement in that distribution[.]” An owner of the house on Dakota Avenue told police that defendant, his girlfriend and Harris were previously in an upstairs bedroom consummating a drug deal. Harris was later apprehended outside the house with a small quantity of the drug. Defendant was later apprehended in the downstairs part of the house with larger amounts of the drug in his possession.
[C]ases in which courts have upheld separate punishment for multiple offenses ... involve situations where the defendant possessed contraband for a significant period of time before its delivery, or only distributed a portion of what he or she possessed. Thus, in United States v. Palacios, 835 F.2d 230 (9th Cir.1987), the court upheld the defendant’s consecutive sentences for possessing and passing counterfeit bills ... where the defendant transferred only some of the counterfeit bills in his possession.
¶22United States v. Mendoza, 902 F.2d 693, 699 (8th Cir.1990) (emphasis added).
¶23In this case, State’s evidence shows defendant possessed cocaine with -intent to distribute it and retained possession of some cocaine after the distribution was completed. At the time defendant was arrested, he was still in possession of cocaine. This was a new crime. It differs from the situation where possession ends upon distribution. Defendant pled guilty to both counts. We find no violations of defendant’s rights under the Double Jeopardy Clause in his conviction and concurrent sentencing for both offenses.
¶24Since defendant’s Double Jeopardy Rights were not violated, we need not reach the question of whether he waived his right of appeal on the issue by pleading guilty to both charges.
¶25Affirmed.
¶26. SDCL 22-42-2 provides in part:
Except as authorized by this chapter or chapter 34-20B, no person may ... possess with intent to ... distribute ... a substance listed in Schedules I or II [of chapter 34-20B].... A violation of this section is a Class 4 felony.
¶27. SDCL 22-42-5 provides:
No person may knowingly possess a controlled drug or substance unless such substance was obtained directly or pursuant to a valid prescription or order from a practitioner, while acting in the course of his professional practice, or except as otherwise authorized by chapter 34-20B. A violation of this section is a Class 5 felony. (Emphasis added).