Thomas Maguire has presented a petition for a writ of habeas corpus to test the legality of his confinement in the Allegheny County workhouse. Upon receipt of his petition on June 4, 1954, we appointed counsel to represent him and, at the same time, granted a rule to show cause. A *204hearing was held June 23, 1954, but no testimony was taken, the basic facts being agreed upon by the district attorney and petitioner’s counsel.
It is agreed that petitioner was arrested December 16, 1952, upon a charge of larceny and receiving stolen goods. In default of bail he was confined in the Erie County Prison immediately subsequent to his arrest. While awaiting a preliminary hearing, petitioner was committed on December 25, 1952, to the Warren State Hospital for the Mentally 111. He remained in the hospital until May 27, 1953, at which time he was released and returned to the Erie County Prison for further proceedings. In the meantime the magistrate had returned a transcript to the district attorney.
Through inadvertence, the district attorney prepared a bill of indictment without observing that a preliminary hearing had not been held. On June 8, 1953, petitioner appeared in open court and waived indictment by the grand jury. The same day he pleaded guilty to the district attorney’s bill and received a sentence of from one to two years in the workhouse. He has already served the minimum.
The sole question involved is whether petitioner is entitled to release because no preliminary hearing was held.
Preliminary hearings were unknown to the early common law: 22 C. J. S., Criminal Law 332. However, in 1555, by statute 2 and 3 Philip and Mary, chap. X, provision was made for preliminary examinations in manslaughter and felony cases. This was the first appearance of the preliminary hearing as a device of criminal procedure in Anglo-Saxon jurisprudence and the statute not only authorized the release of an accused on bail but also authorized the justices of the peace to discharge the prisoner if the charges *205were groundless: Blackstone, book 4, *296. The statute is now in effect in Pennsylvania: Roberts Digest XXXIX, 3 Binney Reports, appendix; Act of January 28, 1777, 1 Sm. L. 429, sec. 2, 46 PS §152.
A number of statutes in Pennsylvania recognized the existence of and necessity for the preliminary hearing. Cf. Act of May 22, 1722, par. 4; Act of June 11, 1885, P. L. 110, 42 PS §722; Act of April 13, 1867, P. L. 1232, 42 PS §723, and Act of May 27,1919, P. L. 306, 19 PS §21. By 1870, the preliminary hearing had become so fully recognized as a key step in criminal procedure that Judge Paxon in In the Matter of the Memorial of the Officers and Directors of the Citizens’ Association, 8 Phila. 478, 480, charged the grand jury that,
“There must be a hearing, at which the defendant may be confronted with his accuser and his witnesses, and have an opportunity to cross-examine the latter, whereupon, if a prima facie case is made out, the magistrate returns it to the court. . . .”
Although the Constitution is silent upon the matter, immemorial custom as well as the statute of 2 & 3 Philip and Mary, supra, has established the preliminary hearing as a privilege and right of every person charged with crime. It is a right which may be set aside in extraordinary cases: Commonwealth v. Green, 126 Pa. 531. And it may be waived by the accused: Commonwealth v. Keck, 148 Pa. 639.
Since there is no contention here that this is an extraordinary case justifying deletion of the hearing from the normal course, the question then arises whether, by waiving formal indictment by the grand jury, defendant did not, at the same time, waive preliminary hearing. The question is a close one. It would seem that a conscious waiver of indictment by the grand jury would automatically carry with it a waiver *206of whatever preliminary defects existed prior to such waiver. This is the logic behind that line of cases which hold it too late to object to an indictment after the entry of a plea thereto: Commonwealth v. Brennan, 193 Pa. 567; 116 A. L. R. 550. But, did this defendant waive anything other than indictment? Had he been represented by counsel at the time of his appearance in court the answer to this question might be different. However, the picture presented here is one in which not one but two major devices of the law were dispensed with by the consent of an unrepresented defendant. No one ever presented him with an opportunity to express himself upon the question whether he waived preliminary examination. The question never was asked and it would not be too logical to presume that defendant intended his waiver of indictment to be also the waiver of another substantial right. In this respect the case closely parallels that of Commonwealth v. Best, 32 D. & C. 359, where an indictment was quashed because there was no preliminary hearing and defendant had not been presented with an opportunity to waive or demand a hearing.
Since petitioner is an admitted thief it might be argued that no useful purpose could be served by insistence upon full compliance with legal requirements. We have developed our system of criminal justice by hundreds of years of experience — some of it extremely painful and grim. We have before us the teachings of those who endured the rigors of experimentation and birth pangs of the system and they demonstrate the wisdom of following the beaten paths of justice laid out for us. In our considered opinion it would not be justice to further confine petitioner in consideration of the fact that one important step was omitted from the procession of those legal devices which have been established.
*207And now, to wit, June 29, 1954, the rule entered June 4, 1954, to show cause why a writ of habeas corpus should not be issued is made absolute; the defendant is forthwith discharged from custody unless detained for other lawful cause.