
245 Kan. 111 (1989)
775 P.2d 179
In The Matter of the Petition of JAMES O. MASON for a Writ of Habeas Corpus.
No. 63,157
Supreme Court of Kansas.
Opinion filed May 26, 1989.
Becky C. Hurtig, assistant public defender, of Wichita, Steven R. Zinn, deputy appellate defender, and Jessica R. Kunen, chief appellate defender, of Topeka, for the petitioner.
Debra L. Barnett and Debra S. Byrd, assistant district attorneys, for respondent.
The opinion of the court was delivered by
HERD, J.:
James Mason petitions for a writ of habeas corpus, *112 claiming the district court erred in denying his motion for dismissal of criminal charges filed against him by the State because a second trial will violate his 5th Amendment right against double jeopardy.
Mason was brought to trial October 24, 1988, on charges of attempted rape, K.S.A. 21-3301, 21-3502; and aggravated battery, K.S.A. 21-3414. After the jury was sworn in, the defense attorney began her opening statement. She told the jury evidence would be presented that on the night in question Mason drank a good deal of alcohol with the complaining witness. Mason would testify he was drunk and had no recollection of the evening after a certain point.
The defense attorney stated the evidence would show Mason was incapable of forming intent because of his alcohol consumption. She stated an alcohol counselor would testify about alcoholism and "blackouts" which may occur in some cases of alcohol abuse. She stated the evidence would show that in a blackout persons are able to function physically, but their actions are not premeditated; "they do not have mental control of their actions." The expert would testify there are many factors affecting the occurrence and intensity of a blackout. Three factors which may increase the likelihood and intensity of a blackout are certain medications, the length of time a person has abused alcohol, and the amount of time a person has remained sober prior to a blackout. Counsel stated the evidence would show Mason was on three different types of medication and began abusing alcohol at the age of 12, but had remained sober for three months prior to the night in question.
At this point, the court granted the State a hearing outside the presence of the jury. After arguments, and objections by the defense, the court ordered a mistrial because the defense had failed to file notice of an insanity defense pursuant to K.S.A. 22-3219.
Mason filed a motion for dismissal of the charges, which was denied. He then filed this petition for writ of habeas corpus pursuant to K.S.A. 22-2710 and Supreme Court Rule 9.01(a) (1988 Kan. Ct. R. Annot. 39) as an original action because the merits of his claim had been presented to and denied by the district court. We granted Mason's motion for a stay of proceedings, and find habeas corpus to be a proper remedy for challenging *113 a trial court's pretrial denial of a claim of double jeopardy. The defendant would otherwise have no appellate forum in this state in which to assert a valid double jeopardy claim before being subjected to such jeopardy. See In re Berkowitz, 3 Kan. App.2d 726, 602 P.2d 99 (1979).
The first issue is whether the district court erred in finding an insanity notice was required. There are only two circumstances under Kansas law where a criminal defendant is required to give notice of an intended defense  alibi, K.S.A. 22-3218; and insanity, K.S.A. 22-3219.
The circumstance of voluntary intoxication is governed by K.S.A. 21-3208(2), which reads as follows:
"An act committed while in a state of voluntary intoxication is not less criminal by reason thereof, but when a particular intent or other state of mind is a necessary element to constitute a particular crime, the fact of intoxication may be taken into consideration in determining such intent or state of mind."
No notice is necessary before a defendant may present evidence of voluntary intoxication.
Despite defense counsel's assertions that Mason had no intention of relying on evidence pertaining to his sanity, or to request a jury instruction on insanity, the court found defense counsel's opening statement so prejudicial as to require a mistrial. The court found that evidence supporting the defense theory of a blackout, including Mason's previous history with alcohol, was evidence of mental illness amounting to insanity, rather than simply evidence of voluntary intoxication.
We have recognized that insanity and voluntary intoxication are two separate defenses. In State v. Seely, 212 Kan. 195, 200, 510 P.2d 115 (1973), we held the defendant was not entitled to an insanity instruction because the evidence showed "alcohol was the key factor in [the defendant's] loss of control and the sina qua non of all of his difficulties." We held "`mental incapacity produced by voluntary intoxication, existing only temporarily at the time of the criminal offense'" does not reach the level of insanity. 212 Kan. at 197. Mason makes no claim that his mental incapacity was caused by anything other than alcohol, or that it was other than temporary. We again indicated the defenses to be separate in State v. James, 223 Kan. 107, 110, 574 P.2d 181 (1977), where we held instructions on both may be given "when there has been evidence of alcohol intoxication which bears *114 upon the issue of a required specific intent and when the defense of insanity is relied upon by the defendant."
The question is whether evidence that intoxication was so severe as to result in a blackout, and that a blackout may have been more likely to occur because the defendant had been drinking since an early age, is such that notice of an insanity defense must be given.
We noted in James, 223 Kan. 107, that an insanity defense may be warranted where the continued use of intoxicants leads to permanent mental deterioration or disease. Counsel made no claim Mason's consumption of alcohol had caused permanent mental deterioration. In State v. DeMoss, 244 Kan. 387, 394, 770 P.2d 441 (1989), the jury heard evidence that the defendant, who was relying on an insanity defense, had a lengthy history of alcohol abuse. We held a separate instruction on voluntary intoxication was warranted since there was no evidence the defendant's consumption of alcohol produced "`permanent mental deterioration or disease sufficient to constitute insanity.'" We held the trial court did not err in refusing to give a diminished capacity instruction because the evidence showed the defendant's "mental state was the result of voluntary intoxication." 244 Kan. at 392-93.
To hold that evidence of a temporary mental condition caused by voluntary intoxication requires the defense to plead insanity would be to abolish the distinctions between the two defenses clearly laid out by statute and our cases. No notice of an insanity defense is required where the evidence points only to a temporary mental state negating specific intent caused by the voluntary consumption of alcohol. The trial court thus erred in declaring a mistrial.
The second issue is whether a second trial is barred by the double jeopardy clause of the 5th Amendment to the United States Constitution, which protects a criminal defendant from repeated prosecutions for the same offense. A defendant is placed in jeopardy once the jury is sworn in. K.S.A. 21-3108(1)(c).
Where a mistrial is declared after the jury is sworn in and over the objections of the defendant, a retrial is constitutionally permissible only where the trial court, in the exercise of its sound discretion, determines the ends of justice require a mistrial. See United States v. Jorn, 400 U.S. 470, 485, 27 L.Ed.2d 543, 91 S. *115 Ct. 547 (1971). In State v. Bates, 226 Kan. 277, 283, 597 P.2d 646 (1979), we held the test to be applied in determining the soundness of a court's discretion in declaring a mistrial is "whether there is a manifest necessity for the act, or the ends of public justice would otherwise be defeated."
We note § 10 of the Bill of Rights of the Kansas Constitution entitles Mason to the same protections against double jeopardy, and that K.S.A. 22-3423(1)(c) sets forth an even more stringent limitation upon the declaration of a mistrial. A mistrial may be granted under the statute when "[p]rejudicial conduct ... makes it impossible to proceed with the trial without injustice to either the defendant or the prosecution."
As we have found Mason was not required to give notice of an insanity defense, it was possible to proceed with trial without injustice to the prosecution. There was no manifest necessity for a mistrial, and the ends of justice would not have been defeated by the trial continuing.
Mason has been released on bond pending disposition of the charges against him. A defendant who has been released on bond nevertheless remains in custody for purposes of a writ of habeas corpus. Hensley v. Municipal Court, 411 U.S. 345, 36 L.Ed.2d 294, 93 S.Ct. 1571 (1973); Henderson v. Schenk, 6 Kan. App.2d 562, 631 P.2d 246 (1981). We find that a second trial is not permitted under double jeopardy and Mason's present custody is therefore wrongful under K.S.A. 60-1505(d).
The writ is granted and Mason is discharged.
