
856 F.Supp. 1504 (1994)
Ronald R. GOODING, Petitioner,
v.
Gary STOTTS, et al., Respondents.
No. 92-3456-DES.
United States District Court, D. Kansas.
June 17, 1994.
*1505 Benjamin C. Wood, Lawrence, KS, for petitioner.
John K. Bork, Office of Atty. Gen., Topeka, KS, for respondents.

MEMORANDUM AND ORDER
SAFFELS, Senior District Judge.
This matter is before the court on a petition for writ of habeas corpus filed pursuant to 28 U.S.C. § 2254. Petitioner, who is currently on parole, was convicted on January 22, 1991, of one count of possession of cocaine and later sentenced to a term of three to ten years. In this action, petitioner challenges his conviction and claims he was twice placed in jeopardy in violation of the protections guaranteed by the Fifth Amendment to the United States Constitution.
At the outset, the court wishes to make very clear the nature of the case before it. This case does not concern whether or not petitioner possessed or used narcotics. Neither is this case merely an issue concerning a question of state law which would preclude habeas corpus review by a federal court.
This case places squarely before the court the federal question of whether petitioner's constitutional right to be protected from prosecution a second time for the same crime was violated by the State of Kansas. The court answers the question in the affirmative and finds that petitioner must be released under this conviction and sentence.

FACTUAL AND PROCEDURAL BACKGROUND
Petitioner was originally charged with seven drug related offenses. The State later added six additional drug related charges.
Just prior to trial, defense counsel was advised by the State that a key prosecution witness, petitioner's former girlfriend, would exonerate petitioner with her testimony. Relying on that information, defense counsel, during opening argument, referred to the favorable testimony. During the course of the trial, the State informed defense counsel that the witness's story had changed and her testimony would now incriminate petitioner. Petitioner, through counsel, immediately moved for a mistrial. The trial court granted the motion.
Petitioner then moved to dismiss on double jeopardy grounds. The trial court denied the motion, but defense counsel was permitted to withdraw when it became apparent he would have to testify at retrial to impeach the recanting witness. Defense counsel then filed multiple motions to dismiss which were denied by the trial court. Petitioner filed an original action in habeas corpus in The Kansas Supreme Court. That court stayed further proceedings while it considered petitioner's claim of violation of the Fifth Amendment protection against double jeopardy.
The supreme court summarily denied the petition and dissolved the stay. The case was again set for retrial.
Petitioner then filed a petition for writ of habeas corpus pursuant to 28 U.S.C. § 2254 in this court, again raising the double jeopardy claim. This court denied relief and dismissed the petition.
Petitioner appealed to the United States Court of Appeals for the Tenth Circuit, but subsequently filed a motion to voluntarily dismiss the appeal. The dismissal was granted without prejudice. This court interpreted the Circuit's order as allowing petitioner to raise any issue, other than the double jeopardy issue dismissed on the merits, in a subsequent 2254 action.
Prior to retrial, petitioner's court appointed attorney and the district attorney's office entered into a stipulation of facts to be presented to the trial court for a determination of guilt or innocence to one count of possession of cocaine. All parties signed the stipulation.
*1506 The stipulation was presented to the trial court on January 18, 1991. The trial court refused to accept the stipulation finding: "I don't think its's legally sufficient to establish a prima facie case." Defense counsel immediately moved the court to find the defendant not guilty based on insufficiency of the evidence. The court refused to do so and set the case for trial.
Four days later, the parties presented a second stipulation of facts to the court. The court found petitioner guilty of one count of possession of cocaine.
Petitioner appealed to the Kansas Court of Appeals raising two issues: (1) the trial court erred when it refused to discharge him after it found the stipulation of facts was insufficient to establish guilt; and (2) the trial court erred when it refused to dismiss the case on double jeopardy grounds following the mistrial. The court of appeals affirmed the conviction. The Kansas Supreme Court denied petitioner's Petition for Review.
Petitioner commenced the present action on December 4, 1992. Respondent filed the Answer and Return on April 30, 1993. Petitioner filed a Motion for Evidentiary Hearing on November 8, 1993.
On April 29, 1994, the court ordered an evidentiary hearing scheduled for June 1, 1994. In addition, the court ordered written briefs to be submitted by May 18, 1994.
Having reviewed the record and having heard evidence and oral argument in this matter, the court makes the following findings and order.

DISCUSSION
The purposes of the constitutional protection against double jeopardy have been articulated frequently. In Serfass v. United States, 420 U.S. 377, 387, 95 S.Ct. 1055, 1062, 43 L.Ed.2d 265 (1975), the court said:
"The constitutional prohibition against `double jeopardy' was designed to protect an individual from being subjected to the hazards of trial and possible conviction more than once for an alleged offense.... The underlying idea, one that is deeply ingrained in at least the Anglo-American system of jurisprudence, is that the State with all its resources and power should not be allowed to make repeated attempts to convict an individual for an alleged offense, thereby subjecting him to live in a continual state of anxiety and insecurity as well as enhancing the possibility that even though innocent he may be found guilty." "
The prohibition of the Double Jeopardy Clause is invoked with the "attachment of jeopardy." In a jury trial jeopardy attaches when a jury is empaneled and sworn. Illinois v. Somerville, 410 U.S. 458, 93 S.Ct. 1066, 35 L.Ed.2d 425 (1973). In a nonjury trial, jeopardy attaches when the court begins to hear evidence. McCarthy v. Zerbst, 85 F.2d 640, 642 (10th Cir.), cert. denied, 299 U.S. 610, 57 S.Ct. 313, 81 L.Ed. 450 (1936).
The "hearing of evidence" does not require the oral testimony of a witness. United States v. Hill, 473 F.2d 759, 761 (9th Cir.1972).
"Many cases are tried solely on written evidence, sometimes on a stipulation of facts, sometimes on a transcript of a preliminary hearing or of a preliminary motion, such as a motion to suppress, sometimes upon evidentiary exhibits alone." Id.

In State v. Pittsburg Paving Brick Co., 117 Kan. 192, 230 P. 1035, 1037 (1924), the Kansas Supreme Court stated that jeopardy arises before a judge sitting alone in the same way as a before a judge and a jury, and held, relative to the case tried on stipulated facts:
"The submission of the case on the agreed facts advanced the trial to the same stage reached in a trial with a jury where the testimony of all the witnesses of both parties had been taken and presented to a duly impaneled jury, which had taken the weight and effect of the evidence under consideration."
In the case before this court, petitioner argues that once the stipulation was submitted to the state trial court, jeopardy attached. Furthermore, petitioner asserts that when the judge stated there was insufficient evidence from which to make a finding of guilt, the trial court had, in effect, acquitted him.
*1507 The State first notes that the doctrine of double jeopardy has been codified in K.S.A. 21-3108. That statute provides in relevant part:
"A defendant is in jeopardy when he or she is put on trial in a court of competent jurisdiction.... and in the case of trial by jury, when the jury has been impaneled and sworn, or where the case is tried to the court without a jury, when the court begins to hear evidence."
The State argues that in the instant case, the trial court had not begun to hear evidence, therefore jeopardy had not attached. The State misstates the general rule and the specific law in Kansas. Both Hill and Pittsburg Paving, supra, correctly state the law; in a case where the parties agree to stipulated facts, the submission of the facts to the court constitutes the hearing of evidence.
The State further argues that it was the intent of the parties that petitioner be found guilty upon the stipulation, and that whether jeopardy attached is immaterial, because the trial court, in its discretion, could, and did, refuse to accept the stipulation.
The stipulation which was signed by defense counsel, the assistant district attorney and petitioner read:
STIPULATION OF FACTS
COMES NOW Ronald R. Gooding, by and through counsel, Richard Lake, and agrees to the following stipulation of facts for the Honorable Fred S. Jackson to consider. Ronald R. Gooding enters a plea of not guilty, to the charge of possession of cocaine, a violation of K.S.A. 65-5127(A). All other charges having been dismissed, the only matter before the court currently is whether or not Ronald R. Gooding did on the 22nd day of June, 1989, in the county of Shawnee in the State of Kansas, did possess cocaine in violation of the above statute.
The stipulation of facts for the court to consider as to whether or not this offense occurred and for the court to determine the innocence or guilt of this defendant would be as follows:
That on the 22nd day of June, 1989, at or about 8:00 A.M., Shawnee County Sheriff's officers did execute a search warrant issued from Shawnee County District Court on the 21st day of June, 1989, at the residence of Ronald R. Gooding, 1234 SW 17th, Topeka, Shawnee County, Kansas. Pursuant to said search, Shawnee County Sheriff's officers did seize certain items of which were included therein, KBI Q16B, of which cocaine was detected.
At the evidentiary hearing conducted in this court, the testimony was contradictory. Petitioner's previous attorneys and petitioner testified there was no agreement that petitioner would be found guilty. The district attorney and the assistant district attorney both testified that it was the intent of both the prosecution and the defense that petitioner would be found guilty.
The prosecution was unable, however, to present any documentary or written evidence to support its contention that all parties intended that petitioner would be found guilty.
The court resolves the issue of whether there was an agreement that petitioner would be found guilty in favor of the petitioner for two reasons.
First, the plain language of the stipulation, signed by all parties, is unequivocal: ".... for the court to consider whether or not this offense occurred, and for the court to determine the innocence or guilt of this defendant. ..." There is no ambiguity in this stipulation of facts. The trial court was to first consider whether the offense occurred and second to determine whether petitioner was guilty or innocent of that offense. There is nothing in the stipulation which even remotely suggests petitioner stipulated that he would be found guilty. To the contrary, petitioner specifically pled not guilty. Second, the State acknowledges there is no written or documentary evidence to support the contention that the parties agreed petitioner would be found guilty.
When a defendant pleads not guilty, agrees to stipulated facts, and submits that stipulation to the trial court for a determination of guilt or innocence, there is always a possibility that if an essential element of the *1508 crime is omitted from the stipulation, the evidence will be "insufficient to convict." Ingersoll v. State, 65 Md.App. 753, 501 A.2d 1373, 1376 (1986). The opportunity to stipulate presents the parties with the ability to exclude evidence that might be disadvantageous. Leonard v. City of Los Angeles, 31 Cal.App.3d 473, 107 Cal.Rptr. 378, 383 (1973). This common tactic obviously affords the possibility that an essential element will be omitted and the stipulation will fail due to insufficiency of the evidence.
This is precisely what happened in the case at bar. The stipulation of facts was agreed to, and signed, by all parties. The trial judge then found the stipulation was legally insufficient to establish a prima facie case and directed that the case go to trial.[1] Such a result is identical to a situation where the prosecution's proof in a jury trial fails to rise to a level which allows the jury to find guilt beyond a reasonable doubt. If the proof is lacking, regardless of whether a case is tried to the court on stipulated facts or to a jury, on either stipulated facts or in a trial filled with in-court testimony, the result is the samethe defendant is found not guilty.
The state trial court erroneously concluded that it could refuse to accept the stipulation. However, once the stipulation of facts was submitted to the court, petitioner had been placed in jeopardy. McCarthy, 85 F.2d at 642; Pittsburg Paving, 230 P. at 1037. In a non-jury trial, jeopardy attaches when the court begins to hear evidence. Serfass, 420 U.S. at 388, 95 S.Ct. at 1062. When a proposed stipulation is accepted by the other party such a stipulation becomes binding on the parties and the court as long as the stipulation is not illegal. Leonard, 107 Cal. Rptr. at 380.
The state argues the petitioner "tried to pull one over on the State." Such an argument ignores the fact that the stipulation was read by the District Attorney who directed the Assistant District Attorney to sign the stipulation. This court presumes the prosecutors are capable of reading and determining the sufficiency of a stipulation. To claim the petitioner tried to pull one over on the State is disingenuous.
The state trial court clearly found the evidence lacking to sustain a conviction. The fact that the court did not call this finding a finding, which warranted petitioner's acquittal, is of no import. The trial judge's characterization of his own action does not control whether that action is an acquittal. United States v. Scott, 437 U.S. 82, 97, 98 S.Ct. 2187, 2197, 57 L.Ed.2d 65 (1978). When the trial court reviewed the stipulation and uttered the words legally insufficient, petitioner was acquitted. From that moment forward, whether the State pursued a full blown trial or attempted to draft another stipulation, petitioner was once again "subjected to the hazards of trial and possible conviction." Serfass, 420 U.S. at 387, 95 S.Ct. at 1062.
The State "with all its resources and power should not be allowed to make repeated attempts to convict an individual for an alleged offense." Here the State agreed to a stipulation which was not sufficient to sustain a finding of guilt. The trial court gave the State a second chance by directing the case go to trial. The second stipulation, which the trial court found sufficient to sustain a guilty verdict, prevented the necessity of a jury trial.
This court finds the State violated petitioner's constitutional rights under the Fifth Amendment by twice placing him in jeopardy for the same alleged offense. Consequently, petitioner's conviction and sentence cannot stand.
IT IS THEREFORE BY THE COURT ORDERED that the petition for writ of habeas corpus is granted and that petitioner is released under this conviction and sentence. The clerk of the court is directed to transmit *1509 copies of this Memorandum and Order to petitioner and respondent.
NOTES
[1]  During the evidentiary hearing conducted in this court, the assistant district attorney testified that during an ex parte discussion with the trial judge prior to the submission of the stipulation, the judge expressed his reservations about the sufficiency of the stipulation. The ADA testified further that the judge did not at that time indicate he would reject the stipulation, but rather expressed displeasure with the document.

This conversation was relayed to defense counsel prior to the submission of the stipulation to the court for determination.
