
473 N.W.2d 456 (1991)
STATE of South Dakota, Plaintiff and Appellee,
v.
Reginald R. GROVES, Defendant and Appellant.
No. 17270.
Supreme Court of South Dakota.
Considered on briefs April 23, 1991.
Decided July 10, 1991.
Mark Barnett, Atty. Gen., Ann C. Meyer, Asst. Atty. Gen., Pierre, for plaintiff and appellee.
Steve Miller, Sioux Falls, for defendant and appellant.
SABERS, Justice.
Defendant, convicted and sentenced concurrently for possession with intent to distribute *457 and simple possession, claims double jeopardy violation.

Facts
Reginald 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.
Around 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.
Police 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.
On 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.
At 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.
At 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.
Four 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.
The 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.

Double Jeopardy
No 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).
*458 If 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.
The 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).
The Blockburger test 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 Blockburger test 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).
"[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).
However, in the context of multiple punishments imposed in a single prosecution, the Blockburger test 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).
Defendant was convicted of possession with intent to distribute in violation of SDCL 22-42-2[1] and simple possession in violation of SDCL 22-42-5.[2] Defendant concedes that possession with intent to distribute requires proof of facts which simple possession does not, i.e., the intention to distribute the controlled substance. Defendant's argument is that simple possession under SDCL 22-42-5 is a lesser included offense within SDCL 22-42-2 because it does not require proof of any element not contained in SDCL 22-42-2, and therefore *459 the conviction and sentence for violation of SDCL 22-42-5 should be vacated.
This 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.
Applying the Blockburger statutory 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 Blockburger test, 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.
The 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.
United States v. Mendoza, 902 F.2d 693, 699 (8th Cir.1990) (emphasis added).
In 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.
Since 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.
Affirmed.
WUEST, HENDERSON and AMUNDSON, JJ., concur.
MILLER, C.J., concurs specially.
MILLER, Chief Justice (concurring specially).
I agree with the majority that defendant's Double Jeopardy Rights were not violated. I would not reach that issue, however, since, in my opinion, defendant waived his right to assert that issue. See Brady v. United States, 397 U.S. 742, 90 S.Ct. 1463, 25 L.Ed.2d 747 (1970).
Defendant appeared before Judge Meierhenry on April 23, 1990, for a plea hearing. He told the judge that he had conferred with his attorney and that he understood both charges against him. After he pleaded guilty, his counsel (who represents him on this appeal) specifically advised Judge Meierhenry that there was a plea agreement to the effect that there would be concurrent sentences on Counts I and II *460 and that Count III (committing a felony while armed with a firearm) would be dismissed. See McMann v. Richardson, 397 U.S. 759, 90 S.Ct. 1441, 25 L.Ed.2d 763 (1970).
Furthermore, approximately two months later at the sentencing hearing, after conferring with his attorneyat the direction of the courthe indicated that he desired to proceed with the sentencing phase of the proceedings. Judge Meierhenry then gave him precisely what he bargained for, i.e., concurrent sentences on Counts I and II! See McMann, supra, "[w]aiving trial entails the inherent risk that the good-faith evaluations of a reasonably competent attorney will turn out to be mistaken either as to the facts or as to what a court's judgment might be on given facts." Id. at 770, 90 S.Ct. at 1448, 25 L.Ed.2d at 773.
In what could properly be called gamesmanship or ambush, some four days after sentencing (!!), he brought on a motion seeking to vacate the concurrent sentences, raising, FOR THE FIRST TIME, the double jeopardy argument. I would hold that his prior plea, pursuant to the specific terms of the plea agreement from which he benefitted, prevents him from making such a challenge. United States v. Broce, 488 U.S. 563, 109 S.Ct. 757, 102 L.Ed.2d 927 (1989).
NOTES
[1]  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.
[2]  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).
