
192 A.2d 630 (1963)
96 R.I. 452
Robert GENEREUX
v.
John J. PELOSI et al.
Supreme Court of Rhode Island.
July 16, 1963.
*631 Aram K. Berberian, for petitioner.
J. Joseph Nugent, Attorney General, Edward F.J. Dwyer, Assistant Attorney General, for respondents.
JOSLIN, Justice.
This is a petition for a writ of habeas corpus directed to the acting superintendent of the state hospital for mental diseases, now known as the Rhode Island medical center, and to the warden of the adult correctional institutions. Although the petitioner prayed that the writ be issued to both the acting superintendent and the warden, the writ as issued was directed only to the former and only he has certified pertinent papers to this court. The case is entitled and has been briefed and argued, however, as though the writ issued as prayed for.
The petitioner has been imprisoned without bail awaiting trial since July 10, 1958 under two indictments for murder to each of which he has pleaded not guilty. His original place of confinement was the adult correctional institutions from which he was transferred on October 21, 1958 to the criminal insane ward of the medical center, referred to in the return as the state hospital for medical diseases, where he has since been confined. The transfer was ordered by the presiding justice of the superior court pursuant to G.L. 1956, §§ 26-4-3 and 26-4-4.
The record of the proceedings before the presiding justice of the superior court which resulted in petitioner being removed from the adult correctional institutions to the criminal insane ward is limited to a petition filed on behalf of the director of social welfare and the order of removal. So far as the record discloses petitioner had no knowledge or notice of the filing of that petition or of the hearing thereon nor was he present or represented by counsel at any stage of those proceedings.
Subsequent to such removal and more than six months prior to the filing of this petition, petitioner moved that the indictments against him be assigned for trial and that his mental competency to stand trial be determined. At a litigated hearing with petitioner present and represented by counsel, he was denied a trial on the ground that he was mentally incompetent. That action was sustained by this court in State v. Genereux, 95 R.I. 292, 186 A.2d 738.
The petition in substance sets forth that the failure of the state to bring petitioner to trial or admit him to bail within six months after his demand for a trial makes his confinement illegal and entitles him to be discharged from imprisonment. The respondent Pelosi's return denies that petitioner's imprisonment is illegal, states that he is not legally competent to stand trial, and asserts that he is lawfully being held at the criminal insane ward by virtue of an order entered pursuant to §§ 26-4-3 and 26-4-4 and that custody of petitioner is under that order and "for no other reason whatsoever." No claim is made that such detention is by virtue of the proceedings which we reviewed in State v. Genereux, supra, and that question will not therefore be considered by us.
By leave of court petitioner both demurred and replied to respondent's return and thereby has directly put in issue the legality of the proceedings pursuant to §§ 26-4-3 and 26-4-4 which resulted in his removal. It is this issue which we will now consider. Those sections read as follows:
"26-4-3. Examination of person imprisoned or awaiting trial.  On the petition of the director of social welfare, or of the officer having the custody of any person awaiting trial or imprisoned in any county of the state, setting forth that such person is insane, the presiding justice of the superior court, or in his absence any justice of the superior court, may make such an examination of said person as in his discretion he shall deem proper."

*632 "26-4-4. Order of transfer to criminal insane ward.  If, upon examination, said justice is satisfied that the person thus imprisoned is insane or idiotic, he may order the transfer of such prisoner from the institution aforesaid to the criminal insane ward, provided for in § 26-4-1." (italics ours)
It is petitioner's contention that §§ 26-4-3 and 26-4-4 if construed as allowing his transfer to and his detention at the criminal insane ward on an ex parte proceeding are in conflict with the constitution of the state, art. I, § 10, and with the due process clause of § 1, art. XIV, of the amendments to the constitution of the United States. In the alternative he contends that §§ 26-4-3 and 26-4-4 should be construed as having required a proper judicial inquiry as a condition precedent to his transfer and detention and that the failure to provide such a hearing constituted a denial to him of due process of law. In support of such contention he cites Quince v. Langlois, 88 R.I. 438, where we held that a statute authorizing the district court to bind by recognizance, with or without security, "such witnesses as it shall deem material" implied that a judicial hearing was required before any such witnesses could be so bound.
Without attempting to define the precise meaning of "due process of law" it clearly connotes at least some legal procedure wherein the person whose rights are to be affected cannot be concluded without being given the opportunity to defend himself. Petition of Doyle, 16 R.I. 537, 18 A. 159.
In the posture in which this matter is before us the sections of title 26 referred to and as here applied have resulted in petitioner being detained at the criminal insane ward for almost five years. The order of transfer which respondent contends is the only license for such detention was induced so far as the record reveals by the unsworn statements of two doctors that petitioner was insane and in need of psychiatric hospital treatment. We cannot believe that the legislature intended that such a result could be achieved without affording to petitioner his day in court.
By expressly providing in § 26-4-4 that a transfer could be ordered only "upon examination" by the court, the legislature clearly evidenced an intention that the question of whether an accused should be removed to the criminal insane ward would be judicially and not medically determined. If it had contemplated otherwise, the words "upon examination" would have been omitted from such section for unless construed as we have construed them they are surplusage. Although the statute may not explicitly demand a hearing, it is our opinion that the requirement of a judicial determination of the mental capacity of an accused is implicit therein. See Quince v. Langlois, supra.
The effect of our holding is not that petitioner should be discharged from imprisonment, but only that the place where he is imprisoned is improper. Where a person is legally held, but is held by the wrong person or confined in the wrong place, he is not entitled to his freedom but only to be removed to the custody of the proper custodian for confinement in the proper place. See In re Bonner, 151 U.S. 242, 14 S.Ct. 323, 38 L.Ed. 149.
The petitioner further contends, however, that his release from any imprisonment is required pursuant to the mandate of G.L. 1956, § 12-13-7. The relevant portion of that section reads as follows: "Every person who shall be indicted for any of the crimes [murder] named in § 12-13-5," and shall be imprisoned under the indictment, shall be tried or bailed within six (6) months next after the time at which he shall plead to such indictment, if he demand a trial * * *."
The petitioner came legally into the custody of the state under its power to prosecute for criminal offenses. He pleaded to *633 the indictments charging him with murder and has been imprisoned without bail more than six months since demanding a trial. At the judicial hearing where he was found mentally incompetent to stand trial the undisputed testimony was that he was incurable, potentially dangerous to be at large, and not ready to be released from the hospital. See State v. Genereux, supra. The contention that the release of one in the special circumstances of petitioner is required by § 12-13-7 presents a narrow issue.
Let us look first to the statute. We cannot believe the lawmakers contemplated that one legally found to be mentally incompetent to stand trial and in the special circumstances of petitioner be either tried or bailed within six months after demand for trial, or in the alternative be released from detention. The statutory requirement that the accused "demand" a trial clearly connotes that he who makes the demand can be legally put to trial. The legislature by its positive provision that "Every person who shall be indicted * * * shall be tried or bailed within six (6) months * * *" did not intend that one in petitioner's circumstances be tried when mentally incompetent to stand trial or be admitted to bail when potentially dangerous to be at large. To construe § 12-13-7 otherwise would bring about an unreasonable result and this we cannot presume the legislature intended. State v. Haggerty, 89 R.I. 158, 159m 151 A.2d 382; Zannelli v. DiSandro, 84 R.I. 76, 121 A.2d 652.
Since it is seldom that an accused who is mentally incompetent to stand trial takes the initiative to demand a trial, the reported litigation on the issue with which we are concerned is not extensive. Foote, "A Comment On Pre-Trial Commitment Of Criminal Defendants," 108 U. Pa. L. Rev. 832, 834. Whatever authorities we have found, however, support the view we have taken as to the limitations on the application of § 12-13-7.
The issue though previously considered by this court was not determined by us. Sevigny v. Langlois, 94 R.I. 230, 179 A.2d 496.
The federal statutes providing for pre-trial commitment are found in 18 U.S.C.A. §§ 4244-48. The relevant portions provide in substance a procedure for determining mental incompetency during the period after arrest and prior to imposition of sentence. In such instance the commitment continues until restoration of sanity or until the mental condition of the person committed is so improved that if released he will not endanger "the safety of the officers, the property, or other interests of the United States."
A conflict in the inferior federal courts as to the constitutionality of the federal statutes insofar as they allow pretrial commitment of persons suffering from mental incompetency of extended duration was resolved in Greenwood v. United States, 350 U.S. 366, 76 S.Ct. 410, 100 L.Ed. 412, where a pre-trial commitment of approximately two years was held to be without error even though the record showed that the person committed had little likelihood of recovery.
Article VI of amendments to the constitution of the United States provides in part as follows: "In all criminal prosecutions, the accused shall enjoy the right to a speedy and public trial * * *." The Fifth Circuit Court of Appeals in Howard v. United States, 261 F.2d 729, relying on Greenwood held that the failure to put the accused to trial because of his mental incompetency did not deprive him of "the right to a speedy trial under the guarantee of the Sixth Amendment." In Howard it was held, therefore, that the word "accused" in the sixth amendment did not include one mentally incompetent to stand trial. Article I, § 10, of the constitution of Rhode Island, the speedy trial constitutional provision, is in haec verba with the quoted portion of art. VI of amendments to the federal constitution. The constitutional *634 safeguard of art. I, § 10, was given concrete form and force by § 12-13-7. In re Deslovers, 35 R.I. 248. Our holding that the words "Every person" in § 12-13-7 were not intended by the legislature to include one in the special circumstances of petitioner is consistent with the holding in Howard.
If the accused himself has put in issue his mental competency to stand trial it has been held that he cannot thereafter claim that either his constitutional or statutory right to a speedy trial has been violated. Germany v. Hudspeth, 10 Cir., 209 F.2d 15; State v. Stanley, 179 Kan. 613, 296 P.2d 1088.
Persons committed at the pre-trial stage for mental incompetency have not been denied the rights granted by speedy trial statutes similar to but not identical with that of this state, the courts in such instances holding that it could not be the intention of the lawmakers to require that an accused be prosecuted and at the same time prohibit his trial. State v. Theard, 203 La. 1026; Connelly v. Balkcom, 213 Ga. 491.
Both on the decisional law and on our interpretation of what was contemplated by the legislature, we conclude that petitioner has not been denied any rights under § 12-13-7.
The petitioner has a justifiable complaint as to the unlawfulness of his place of imprisonment. His complaint that he is imprisoned, however, we have found to be without merit. He is entitled to relief only from the unlawful feature of his imprisonment.
In reaching our conclusion as to the nonapplicability of § 12-13-7 we note, as the court said in Greenwood v. United States, 350 U.S. 366, 376, 76 S.Ct. 410, 415, 100 L.Ed. 412: "We decide no more than the situation before us presents and equally do not imply an opinion on situations not now before us."
The petition for the writ of habeas corpus is granted. The acting superintendent of the Rhode Island medical center is directed to release the petitioner from his custody to the sheriff of the county of Providence, or any of his deputies, who shall forthwith remove the petitioner and deliver him to the custody of the warden of the adult correctional institutions to be held in accordance with law and until further order of the superior court. The papers certified to this court are ordered returned to the acting superintendent of the Rhode Island medical center with our decision endorsed thereon.
