On recommendation of the Court of Appeals, Springfield District, this cause was ordered transferred to this court prior to opinion, pursuant to Art. V, § 10, of the Constitution of Missouri, V.A.M.S. and Supreme Court Rule 83.06, V.A.M.R.
By information filed December 17, 1970, appellant was charged with first degree murder in the slaying of his wife on December 17, 1968.1 At his arraignment in circuit court on December 17, 1970, appellant was represented by counsel and he entered pleas of (1) not guilty and (2) not guilty by reason of mental disease or defect excluding responsibility. The state refused to accept the latter plea and a psychiatrist was appointed to examine appellant. Thereafter, a hearing was had on January 11, 1971; the state accepted the plea of not guilty by reason of mental disease or defect excluding responsibility; the court entered a finding of not guilty in accordance with that plea; and, the court further found that appellant was still suffering from a mental disorder and ordered him committed to the custody of the Director of Mental Diseases of the Missouri Department of Health at State Hospital No. 1 in Fulton.
On May 26, 1972, appellant filed an application for unconditional release; a hear*21ing was had; and, the trial court denied relief on July 12, 1972.
On March 19, 1973, appellant filed pro se a “Writ of Mandamus for Unconditional Release.” This was considered by all concerned to be an application for an order of unconditional release pursuant to § 552.-040(4), RSMo.1969, V.A.M.S., as had been the application of May 26, 1972. In the application appellant referred to § 552.040 and indicated the same was filed under that section, but in his pro se appellate brief he claims that “[i]n truth the intent was for prosecution of habeas action under § 532.010 et seq. ... and V.A.M.R. 91.01 et seq.” Appellant’s court-appointed counsel seemingly treated the proceeding as one under § 552.040. Both the state and the superintendent of the hospital filed objections to appellant’s request for release and a hearing was had. The release requested was denied.
Thereafter, appellant’s counsel filed a notice of appeal in the Court of Appeals, and appellant, pro sc, directed an appeal to this court; however, any confusion created thereby has passed as the cause after transfer now rests in this court as if on original appeal. Art. V, § 10, Missouri Constitution. See also: State v. Kee, 510 S.W.2d 477 (Mo. banc 1974); State v. Anderson, 515 S.W.2d 534 [2, 3, 4] (Mo. banc 1974); Missouri’s Mental Responsibility Law. A Symposium: An Analysis of The Law, Richardson, Reardon and Simeone, 19 J.Mo.B. 645, 719, n. 42 (Dec.1963); and, Model Penal Code (ALI), Sec. 4.-08(3).
From the record before us, we are confronted first with the fact that appellant is presently illegally confined. Section 552.-030 provides, in part:
2. The state may accept a defense of mental disease or defect excluding responsibility, whether raised by plea or written notice, if the defendant has no other defense and files a written notice to that effect. Upon the state’s acceptance of the defense of mental disease or defect excluding responsibility, the court shall proceed to order the commitment of the defendant as provided in section 552.040 . . . (Emphasis added.)
There is no showing that appellant ever abandoned or withdrew his plea of “not guilty” or filed a written notice that he had no defense other than not guilty by reason of mental disease or defect excluding responsibility. This being true, § 552.-030, subd. 2 did not authorize the state to accept the second plea and ignore the first, nor did it authorize the trial court to proceed in that manner. Any doubts in this connection were put to rest in Ex Parte Kent, 490 S.W.2d 649 (Mo. banc 1973), cert. denied 414 U.S. 1077, 94 S.Ct. 596, 38 L.Ed.2d 484 (1973). See also State v. Kent, 515 S.W.2d 457 (Mo. banc 1974).
More recently, the Kansas City District of the Court of Appeals in Briggs v. State, 509 S.W.2d 154 (Mo.App.1974), considered a comparable factual situation and, while following the guidelines set out in Ex Parte Kent, supra, reached the same result.
Again, we rule that a commitment under § 552.040 by virtue of the provisions found in § 552.030, subd. 2 is invalid unless predicated on the defendant having filed a “written notice” that he had “no other defense.”
Supreme Court Rule 91.05 (See. also § 532.070, RSMo 1969, V.A.M.S.) provides:
Whenever any court of record, or any judge thereof, shall have evidence, from any judicial proceedings had before such court or judge, that any person is illegally confined or restrained of his liberty, within the jurisdiction of such court or judge, it shall be the duty of the court or judge to issue a writ of habeas corpus for his relief, although no application or petition be presented for such writ.
We recognize, as must the trial court, the mandate of the rule just noted; however, issuance of a writ in this case would *22cause an unnecessary delay because there is no evidence to hear nor credibility to weigh but only a record which reflects non-compliance with the law. Therefore, we treat the cause as on appeal and remand the same to the trial court for further proceedings consistent with those delineated in Ex Parte Kent, supra.
The judgment is reversed and the cause is remanded.
All concur.. The record in the magistrate court reflects that (1) on November 19, 1969, it was found that appellant had a mental disease or defect excluding fitness to proceed (§ 552.020 subd. 2), and that (2) on December 14, 1970, it was ruled that he was competent to proceed.