
96 Ariz. 139 (1964)
393 P.2d 148
Joseph D. GOODMAN, Petitioner,
v.
STATE of Arizona, Respondent.
No. 8096.
Supreme Court of Arizona, En Banc.
June 10, 1964.
*140 Joseph D. Goodman, pro. per.
C. Webb Crockett, Phoenix, amicus curiae.
Robert W. Pickrell, Atty. Gen., by Edward I. Kennedy, Asst. Atty. Gen., for respondent.
BERNSTEIN, Justice.
Petitioner herein filed a Motion to Arrest Judgment and Sentence and a Motion to Dismiss, which this court will consider as a Petition for a Writ of Habeas Corpus. Where relief may be granted by extraordinary writ, this court may grant the appropriate relief, even though the writ applied for or the motion made is not aptly titled. We look to substance not to form. Buell v. Superior Court, 96 Ariz. 62, 391 P.2d 919; State ex rel. Ronan v. Superior Court, 95 Ariz. 319, 390 P.2d 109.
On March 7, 1962, petitioner pled guilty to the crime of burglary (first degree) in Maricopa County Superior Court, and was sentenced to serve a term of not less than 4 years nor more than 7 years.
On March 22, 1962, petitioner was charged with and pled guilty to "Escape from County Jail  a Felony", A.R.S. § 13-393. On this plea of guilty petitioner was sentenced to a term of from 3 to 5 years to run consecutively after the burglary sentence. He was removed to the penitentiary and filed this petition alleging that the crime of "Escape from County Jail  a Felony" does not include escape from the county hospital.
The escape took place prior to the sentence for burglary. We find in the record in a statement of facts prepared for the trial judge by the county attorney, which in this respect is not controverted by petitioner, the county attorney stated:
"The defendant while in custody in the Maricopa County Jail was transferred to Maricopa County Hospital for the purpose of a mental examination. The defendant was placed in Ward 70 with leg iron restraint on his left leg.
"The defendant states that some man who was visiting another patient saw his leg iron and the following day *141 brought him a hack saw blade. After cutting a link in the leg iron chain, the defendant took clothes that belonged to a fellow patient and left the hospital. The escape took place in the early morning of December 29, 1961."
The fact that petitioner pled guilty does not bar him from seeking a remedy by habeas corpus. Eyman v. Deutsch, 92 Ariz. 82, 373 P.2d 716. Petitioner's contention is that the court lacked jurisdiction to accept his plea or to impose sentence because escaping from a county hospital, which he admittedly did, has not been made a crime in Arizona. This question may be raised by habeas corpus. Eyman v. Deutsch, supra.
Any escape by a prisoner from lawful custody was an offense at common law. Smith v. State, 145 Me. 313, 75 A.2d 538. In Arizona, common law crimes have not survived. There must be a statute specifically prohibiting the act. Engle v. State, 53 Ariz. 458, 90 P.2d 988.
The state contends that escape from the county hospital is covered by A.R.S. § 13-393, under which petitioner was convicted. This section provides:
"A person who, being confined in a county jail, escapes therefrom, is guilty of a felony if the confinement is upon a charge, arrest, commitment or conviction for a felony, and is guilty of a misdemeanor if the confinement is upon a a charge, arrest, commitment or conviction for a misdemeanor." (Emphasis added.)
The state urges us to construe this statute as if it read "a person who escapes from lawful custody * * *" and to hold that it is in effect an enactment of the common law. We cannot go so far in rewriting the statute.
If the word "jail" had been used alone, we might be justified in giving it its broadest common law meaning. Here the reference is to "county jail", a much more definite term, and is used in contrast to "state prison" in A.R.S. § 13-392, which punishes escapes from that institution. Furthermore A.R.S. §§ 13-391 and 13-394 the only other sections in the article relating to escape, rescue and breach of prison, do use the word "custody" and are as broad as the common law. We hold that when the legislature said, "county jail" it meant "county jail" and did not intend to include the county hospital.
The Missouri escape statute is broader than ours, and covers escaping from "the `custody of an officer or employee of the state department of corrections.'" The Missouri Supreme Court has held that it does not cover an escape from the Missouri State Hospital. State v. Burris, Mo., 346 S.W.2d 61.
*142 The Arizona statute was adopted from California in 1901. The California escape statute has since been amended to make specific reference to "county hospitals". See Ex parte Haines, 195 Cal. 605, 234 P. 883; People v. Mackie, 100 Cal. App. 292, 279 P. 821 (hearing denied by Supreme Court).
The state has directed our attention to People ex rel. Cohalan, on behalf of Buckner v. Warden of City Prison, Sup., 96 N.Y.S.2d 749, and People ex rel. Broderick v. Noble, 26 Miss.2d 903, 207 N.Y.S.2d 467, holding that time in transit or in hospitals must be included in computing the time served in determining when a prisoner should be released. These decisions are based, as the court said in Noble at page 469, on the view that "the terms prison and jail should be construed in the spirit of the section which was to confer benefit upon the person under lawful arrest." (Emphasis in original.) These cases have no application to the case now before us.
The trial court had no jurisdiction in the escape case against petitioner because no crime was charged in the information. The sentence imposed for escape was invalid.
This petition for a writ of habeas corpus, however, has been brought prematurely. Relief cannot be granted while petitioner is still lawfully held in custody as the result of his plea of guilty on the charge of burglary. McNally v. Hill, 293 U.S. 131, 55 S.Ct. 24, 79 L.Ed. 238.[1] Cf. In re Walker, 92 Ariz. 125, 374 P.2d 878. The writ must be denied, but without prejudice to petitioner's right to file another petition at the proper time.
The court wishes to express its appreciation to C. Webb Crockett, Esq. of the Phoenix Bar, who, at the request of the court prepared a memorandum in support of petitioner's position, which has been of great value to the court in deciding this case.
Writ denied.
UDALL, C.J., LOCKWOOD, V.C.J., and STRUCKMEYER and JENNINGS, JJ., concurring.
NOTES
[1]  The rule was formerly to the contrary in the Eighth Circuit. O'Brien v. McClaughry, 10 Cir., 209 F. 816. In New York habeas corpus may be used to set aside an invalid sentence, even though the minimum period of the proper sentence has not expired. People ex rel. Stevens v. Jackson, 283 App.Div. 3, 125 N.Y.S.2d 905; United States ex rel. Smith v. Martin, 242 F.2d 701 (2nd. Cir.)
