[494]*494Ethridge, J.
This case involves an order of a circuit court before trial transferring a defendant indicted for murder to the Mississippi State Hospital at Whitfield for a psychiatric examination. It was attacked by a habeas corpus proceeding brought by the accused, Byron De La Beck-with, against Dr. W. L. Jaquith, director of the hospital, where the court had delegated to make the mental examination. The circuit judge held the committing order was void, discharged Beckwith from confinement in the hospital, and directed him to be held in the custody of the sheriff of the habeas corpus court until further order. The state appealed from that judgment.
The issues are whether the order committing* accused for psychiatric examination (made over objection of his counsel) was invalid because not supported by any evidence reflecting a reasonable probability that accused was incapable of conducting a rational defense, thus denying him due process of law; and whether such a committing order, with those manifest defects, can be attacked by habeas corpus. We answer these questions in the affirmative.
The pertinent statute is Chapter 262, Mississippi Laws 1960 (Miss. Code 1942, Rec., Sec. 2575.5):
"In any criminal action in the circuit court in which the mental condition of a person indicted for a felony is in question, the court or judge in vacation on motion duly made by the defendant, the district attorney or on the motion of the court or judge, may order such person to submit to a mental examination by a competent psychiatrist selected by the court to determine his ability to make a defense; provided, however, any cost or expense in connection with such mental examination [495]*495shall he paid by the county in which such criminal action is pending.”
I.
Beckwith was indicted at the July 1963 term of the Circuit Court of Hinds County for the murder of Medger Evers. Upon arraignment he pleaded not guilty. On July 15 the district attorney filed a “Suggestion of Insanity and Motion . . . for Mental Examination of Defendant.” The motion alleged that Evers was killed on June 12, 1963, and the district attorney through investigation had obtained facts which placed “the mental competency or sanity of the defendant in serious question. ’ ’ Hence movant asked the court to order defendant to submit to a mental examination by a competent psychiatrist selected by the court “to determine his ability to make a defense, as well as to determine the mental state of the defendant on June 12, 1963.” Beckwith, represented by three able and experienced attorneys, filed a response, which asserted that he was capable of making a rational defense to the charges against him, and there was no question but that his mental condition permitted him to make such defense. Defendant and his attorneys objected to such an examination. They asserted it would violate his constitutional right to a speedy trial (taking 30-90 days), would require him to be a witness against himself, and would deny him due process of law.
On July 18 there was a hearing on this motion and the response. The state’s evidence in support of its motion was weak and limited in scope. A psychiatrist said that he saw Beckwith on one occasion as a patient sometime in the spring of 1962. He arrived at a diagnostic conclusion, hut was not permitted to give it, since it would violate the physician-patient privilege.
Yerger Morehead, an attorney of Greenwood, is a first cousin of Beckwith. When Beckwith’s father died [496]*496in California, lie brought him and his mother back to Mississippi. Beckwith was between five and six years old at that time. His mother died when he was eleven, and Morehead was appointed his guardian. He lived in the same house with Beckwith from the time the latter was five and a half years of age until 1941. Both were in the Marine Corps in World War II, and for several months after that they again lived in the same household. Morehead was of the opinion that Beckwith’s mental condition was changed after from what it was before the war. He stated:
“I think he is able to confer fully with his attorneys and to consult with them and to prepare his defense along with them but . . . after a period of a number of years of observation and under the conditions in which I saw him I don’t believe he is mentally capable of being guilty of a crime of violence. . . Nevertheless, the witness said there was no question in his mind but that accused was able to make a rational defense and confer with counsel.
A cotton farmer of Greenwood said that during the second week in June, shortly before the alleged killing, Beckwith called to sell him some fertilizer; that he had a pistol in his pocket, they discussed it, and Beckwith said he carried it with him to Sunday School and church, and had been carrying the weapon for a number of years.
The remaining- evidence offered by the state was documentary in nature. In 1960 Mrs. Beckwith filed a divorce action against her husband, alleging numerous acts of habitual cruel and inhuman treatment, including physical assaults upon her. The Chancery Court of Leflore County granted her a divorce from defendant, after finding that all of the allegations of fact in the original bill were true. In February 1961 Mrs. Beckwith and petitioner were remarried, and in September 1962 she again filed a bill for divorce, again • alleging habitual cruel and inhuman treatment of her, including physical vio[497]*497lence. Beckwith contested the second action. On October 9, 1962 the Chancery Court of Leflore County granted her a divorce from him, finding that the facts alleged in the hill were true. The state also introduced in evidence a judgment of a justice of the peace of Leflore County, based on an affidavit by Mrs. Beckwith, in which that court found she had just reason to apprehend that petitioner would carry out a threat to kill her, and required him to make a peace bond for a term of six months. This was all of the evidence offered by the state on its motion for a psychiatric examination.
For the defendant, Stanny Sanders, one of Beckwith’s attorneys, testified: “He has been able to confer with us logically and in my question — in my judgment as one of his attorneys there is no question but that Mr. Beckwith is able to confer with his counsel in a logical manner and to make a rational defense in this cause which is now pending against him. My associate attorneys, whom I have already named, are- of the same opinion. ’ ’
After the .hearing the Hinds County Circuit Judge rendered an opinion, in which he concluded, in effect, that there was a probability of present insanity, and appointed Dr. W. L. Jaquith, a psychiatrist, to make a psychiatric examination of the defendant. The order for mental examination (dated July 19, 1963) stated it was based on Code section 2575.5; and the evidence raised a question as to the mental condition of defendant. It directed Dr. Jaquith “to make a careful examination into the mental condition of the defendant”; ordered the Sheriff of Hinds County to cooperate with Dr. Jaquith; and authorized him to transport the prisoner to the hospital at Whitfield, which is in Rankin County-.
II.
Around July 31 Beckwith’s.three attorneys filed the present petition for writ of habeas corpus, to the Judge [498]*498of the Eighth Circuit Court District, which includes Ban-kin County, location of the hospital, and which is adjacent to Hinds County, in a separate district. It recited the facts of indictment, his transfer to the hospital for psychiatric examination, and alleged that the order' of July 19 committing him was void, since it was without any limitation, and authorized determination of Beck-with’s sanity both at the time of trial and also at the time of commission of the alleged crime. The petition averred that the evidence in the hearing before the Circuit Court of Hinds County showed without dispute that Beckwith was mentally capable of making a rational defense; that he was entitled to a speedy trial, and the order for psychiatric examination denied him that right and due process of law under the state and federal constitutions. The state answered, the writ was issued, and a hearing was held on August 9, 1963 before Honorable O. H. Barnett, Circuit Judge of the Eighth District. A transcript of the proceedings on the motion for examination before the Circuit Court of Hinds County was introduced in evidence without objection by the state.
Judge Barnett held that proceedings under the statute were designed to determine Beckwith’s ability to make a defense; the order did not provide it was for the purpose of determining his ability to make a defense to the crime with which he was charged; the evidence showed without dispute that he was capable of making a rational defense; and for those reasons the order was invalid. He overruled the state’s motion to modify the order of the Hinds County Circuit Court, by restricting the examination to capacity to make a rational defense at the present time, on the ground he had no power to modify the order of another court. Hence the judgment of the Circuit Judge of the Eighth Circuit Court District sustained the petition for writ of habeas corpus, discharged Beckwith from confinement in the hospital, and held that, until further order, his custody was awarded [499]*499to the Sheriff of Banldn County, to await trial in the Circuit Court of Hinds County. The judge retained jurisdiction for the purpose of rendering such further orders as might he proper to see that Beckwith was present for trial on the murder indictment.
III.
Beckwith could not take a direct appeal to this court from the July 19 order of the Circuit Court of Hinds County committing him to the hospital for psychiatric examination. A direct appeal was not available. It lies only from a final judgment. Miss. Code 1942, Rec., § § 1150, 1945. The committal order was not a final judgment. An appeal can not be taken without a verdict, judgment and sentence of the court. Lang v. State, 238 Miss. 677, 119 So. 2d 608 (1960). Since petitioner had no right of direct appeal, he either had to submit to the psychiatric examination or seek a remedy by applying for habeas corpus.
There is no issue on this appeal pertaining to insanity at the time of the offense. The test for insanity at time of offense is entirely different from that of capacity to stand trial. In the former, this court follows the majority, common law rule of the McNaghten case, by which the test of criminal responsibility requires an ability to know the difference between right and wrong at the time of commission of the crime.
In the instant case, we are concerned solely with whether there was any evidence raising a reasonable probability placing “in question” the accused’s “ability to make a defense,” upon which to base the order for examination. Code § 2575.5. As to the last phrase, the court is concerned with a defendant being physically and mentally able to confer with his counsel as to the merits of the case, and to testify as a witness in his own behalf. In short, he should be able to comprehend his position and to participate rationally in his [500]*500defense. Eastland v. State, 223 Miss. 195, 78 So. 2d 127 (1955); McGinnis v. State, 241 Miss. 883, 891, 133 So. 2d 399 (1961).
Both before and after the 1960 statute, the rule has been that, where there is a reasonable probability that defendant is incapable of making a rational defense, the trial should not proceed until his mental condition has been investigated and it appears he is capable of standing trial. McGinnis held that the statute made no change in. the law in reference to trying a person on present insanity. Its purpose was to authorize the circuit judg’e to appoint a psychiatrist and to pay for the expense of the examination from county funds. Cf. Miss. Code 1942, Rec., § § 6909-11, 2499-2503, 2573-2575, 6777. Code section 2575.5 requires that, before the psychiatric examination is ordered, the court should find that the defendant’s ability to make a defense is “in question”, meaning that there is such a reasonable probability that he is incapable of making a rational defense, as to warrant the psychiatric test. The essential basis of an order under section 2575.5 is a finding of such reasonable probability founded upon evidence supporting such a finding.
If such evidence exists, then the psychiatric examination under the statute may be ordered, as an aid to the court and the jury in determining the issue of present insanity. Assuming a properly authorized psychiatric examination has been made under the statute, the court and the jury may then consider the doctors’ finding’s in determining, as a question prior to trial on the merits, the issue of present insanity. Robinson v. State, 223 Miss. 70, 81, 77 So. 2d 265 (1955). By its own terms section 2575.5 authorizes an order for psychiatric examination of an accused only where there is evidence indicating a reasonable probability that the defendant is incapable of making a rational defense.
[501]*501 The trial judge has a reasonable discretion when acting under the statute, but the statute defines the scope and limitations of orders under it. The discretion is a judicial one, including a requirement that there must he some evidence warranting a conclusion of reasonable probability, before an accused can be committed to a hospital for a lengthy psychiatric examination. Ordinarily orders under section 2575.5 are not controverted, since usually defendant or his counsel request or agree to them. Nevertheless, the statute has its limitations. ' It requires some evidential basis.
In the instant case there is no showing whatever that there is any reasonable probability that Beck-with is incapable of conducting a rational defense in the trial on the indictment against him. Hence there is no basis for the order for psychiatric examination. On the contrary, all of the evidence shows otherwise, namely, that he is entirely capable of standing trial. He is represented by three able and experienced attorneys. All of them agree that he has the present capacity to stand trial. The state’s evidence does not contradict their conclusions reached after numerous conferences with defendant. Morehead, appellee’s counsin and a lawyer, also said that there was no question but that accused was able to make a rational defense and confer with his counsel. The two divorce suits and the judgment for a peace bond do not indicate present incompetency to stand trial. Moreover, the Hinds County Circuit Judge did not indicate that any doubt of accused’s sanity resulted from the court’s own observation of him. See Eslick v. State, 238 Miss. 666, 119 So. 2d 355 (1960); 14 Am. Jur., Criminal Law, Secs. 44-47.
In short, there is no evidence in this record which raises a reasonable question or doubt that accused has insufficient soundness of mind to appreciate the charges against him, and the proceedings on them, and to enable him to make a proper defense. 23 C.J.S., Criminal Law, [502]*502Sec. 940(5) (b), p. 747. The evidence affirmatively reflects that there is no question as to appellee’s present sanity.
IV.
In summary, the order attacked in this habeas corpus proceeding* committed Beckwith to the Whitfield hospital for a lengthy psychiatric examination under Code section 2575.5. The order of committal was based on that statute and was in violation of its requirements. There was no evidence presented to the Circuit Court of Hinds County indicating a reasonable probability of present insanity. Moreover, although counsel can not determine the decision of a court, it is significant that the order was executed over the vigorous protests of the three able and experienced attorneys representing the defendant. Beckwith had no right of direct appeal to this court from that order, although it was invalid because it was not based upon justifying evidence and denied him his constitutional right to due process of law. Yet the order requires him to submit to this lengthy and necessarily detailed psychiatric examination.
The question is whether he is without remedy. We think not. The issue is uncommon but not without precedent, as will be indicated subsequently. We conclude that under these limited and qualified circumstances, petitioner had the right to attack the order by habeas corpus.
The Great Writ, as it has been called, is guaranteed by the constitution of this state. Section 21 states: “The privilege of the writ of habeas corpus shall not be suspended, unless when in the case of rebellion or invasion, the public safety may require it, nor ever without the authority of the Legislature.” Miss. Code 1942, Rec., § 2815 states in broad terms, ‘ ‘ The writ of habeas corpus shall extend to all cases of illegal confinement or detention by which any person is deprived of his liberty, . . .” Certainly ordering a man to a mental hospital for [503]*503lengthy psychiatric examination constitutes an illegal detention, where there is no adequate reason for the committal order, and it was beyond the statutory authority.
A proceeding- to enforce the right of personal liberty by means of a writ of habeas corpus is civil and not criminal. State v. Gordon, 105 Miss. 454, 62 So. 431 (1913). On the other hand, the writ of habeas corpus can not perform the functions of a writ of error or an appeal. Scott v. State, 70 Miss. 247, 11 So. 657 (1892); Kelly v. Douglas, 164 Miss. 153, 144 So. 237 (1932). Moreover, interlocutory appeals can not be taken from preliminary orders of the circuit court. These principles are sound, and must be maintained. In Rogers v. Jones, 240 Miss. 610, 128 So. 2d 547 (1961), the Court recently restated in a comprehensive manner these essential limitations on the writ. They are sound. However, Rogers illustrates one reason why these limitations are not applicable in the instant case. There it was held that habeas corpus would not be issued to release prisoners upon grounds that pleas of guilty were fraudulently obtained at a time when their attorney was not present, and if they had a remedy, it was by writ of error coram nobis. The same parties subsequently proceeded with coram nobis and obtained relief. Rogers v. State, 243 Miss. 219, 136 So. 2d 331 (1962).
Here the order committing Beckwith was made before trial, and in this sense it was interlocutory. As we have also shown, it was void because exceeding the bounds of the statute and due process of law. Moreover, the carrying out of the order would subject petitioner without legal authorization to an intense psychiatric examination.
If Beckwith is without a remedy to test the order rendered under these circumstances, then a right of appeal after trial and final judgment would be meaningless. The psychiatric examination would be a fait ac[504]*504compli. The argument for a need to use regular appeal processes is inapplicable under these circumstances.
Although this record affirmatively shows there were no improper motives by the state’s attorneys in requesting the order of committal, we must consider basic legal principles in deciding particular cases. One student of this problem recently stated the dangers in permitting judicially unreviewable commitments:
“The rule on insanity at the time of trial (which incidentally is a rule which arose in a day when defendants were not afforded counsel) is actually being used for purposes other than that for which 'it was intended. . . .
“While present incapacity to stand trial is usually urged by the defense, it may also be raised in many jurisdictions by the district attorney or on the court’s own motion. While ostensibly for the benefit of the accused, this procedure often works to deprive him of his constitutional right to a speedy trial. When defense counsel is available, there is little justification in allowing the plea of present insanity by the state. Quite frequently, the district attorney raises the issue of unfitness to proceed so as to put ‘undesirables’ away in cold storage without the benefit of trial. (They may not be convicted either under the McNaghten or other rules or for lack of evidence, or they may not be committable under the mental health laws.) The criminal charge serves as little more than a fictional jurisdictional excuse for inteterminate confinement.” Slovenko, Psychiatry, Criminal Law, and the Role of the Psychiatrist, Summer 1963 Duke L.J. 395.
The Supreme Court of Ohio dealt with this particular problem in State ex rel. Smilack v. Bushong, 159 Ohio St. 259, 111 N.E. 2d 918 (1953), affirming ibid., 112 N.E. 2d 675 (C.A. 1952). Smilack was indicted by the grand jury for refusal to testify upon subpoena before a standing committee of the general assembly. With counsel, [505]*505he pleaded not gnilty. Thereupon the prosecuting attorney stated to the court that Smilacli had previously had psychiatric treatment, that it was the feeling of people who knew him that he had a mental disease; and he asked the court to commit accused to the hospital for thirty days for observation and report as to his mental condition. Over the vigorous objection of defendant’s counsel, the court acting under a statute sustained the state’s motion. Thereafter Smilack filed a petition for writ of habeas corpus, and charged that his commitment was without any legal authority. Sustaining this position, the court said:
“The sending of a person to an institution for the criminal insane, even for a short time, is a serious matter and his confinement there is as full and effective a deprivation of personal liberty as in his confinement in jail.
“It appears from the record in the instant case that the accused was ordered taken to the Lima State Hospital for observation for a period not exceeding one month, against his vigorous protest and where he had pleaded not guilty to an indictment charging him with a misdemeanor punishable only by fine. Such confinement was made (1) on the unsworn statement of the prosecuting attorney for Franklin county as to his belief, based on hearsay, that the accused is not sane, (2) without any semblance of a formal hearing as to the accused’s mental condition, and (3) without the presentation of any sworn evidence tending to prove insanity.
‘ ‘ That procedure was not such as is contemplated and required by the statutes quoted and operated to deprive the accused of the due process of law guaranteed by Section 16, Article I of the Ohio Constitution, and the Fourteenth Amendment to the federal Constitution.”
In re Lutker, 274 P. 2d 786 (Okla. 1954), also upheld the right of an original action in habeas corpus to obtain release from a mental hospital under a commitment for psychiatric examination. Lutker was indicted for in[506]*506decent exposure, and pleaded not guilty. Immediately after arraignment the county attorney in open court moved the court for an order of committal, and such order was entered over the objection of defendant’s counsel. The Oklahoma statute provided that, if a person is held on criminal charges, “and the question arises as to his sanity or state of mental health”, he could be committed to a state hospital for observation not exceeding 90 days. Lutker then brought a habeas corpus proceeding for release from the commitment. Discharge from that examination was granted, because he had not received notice and an opportunity to be heard before the order was made. The court cited with approval the Smilack case. It held the statute was valid, but that it was applied in an unconstitutional manner. Discussing the precise issue in the instant case,- the Oklahoma court said:
“The order made on such application is not a final order and no appeal may lie from such order. It is merely a temporary or interlocutory order of commitment pending the trial of the accused. The remedy of the accused where he feels the restraint is not in conformity with the law is by habeas corpus.” See also People ex rel. Apicella v. Supt. of Kings County Hospital, 173 Misc. 642, 18 N.Y. Supp. 2d 523 (1940); 29 C.J.S., Criminal Law, § 940(2), p. 734; cf. Lynch v. Overholser, 369 U. S. 705, 82 S. Ct. 1063, 8 L. Ed. 2d 211 (1962); Anno., 32 ALR2d 434 (1953); Anno., 142 ALR 961 (1943).
Hawie v. Hawie, 128 Miss. 472, 91 So. 131 (1922), involved a person held under indictment for murder and an attempt by the chancery court to inquire into his sanity. The circuit court had exclusive jurisdiction over Hawie, and it was the duty of that court to make the inquiry into his sanity. It was noted there was no statute at that time authorizing the circuit court to send a prisoner to a mental hospital. In the present [507]*507case, however, the circuit court of the county of indictment, acting under the statute, committed the accused to the hospital for mental examination. This presents an entirely different question from Hawie, because the present issue is whether the circuit court’s order was entered within the authority of the statute.
In this state it has been held that relief may be granted on habeas corpus “for incurable, radical, fatal defects, plainly and indisputable manifest of record.” White v. State, 185 Miss. 307, 188 So. 8 (1939); Scott v. State, 70 Miss. 247, 11 So. 657 (1892). A defendant may also obtain relief by habeas corpus for an order which the court had no power to make, although it had jurisdiction on the parties and the subject matter. McHenry v. State, 91 Miss. 562, 44 So. 831 (1907); Ex parts Burden, 92 Miss. 14, 45 So. 1 (1907); State v. Chambliss, 142 Miss. 256, 107 So. 200 (1926).
The order of the Hinds County Circuit Court, under Code Section 2575.5, contained “fatal defects, plainly and indisputably manifest of record.” It exceeded the limitations of the statute, because there was no evidence showing a reasonable probability of present sanity, and therefore it operated to deprive petitioner of due process of law. A pretrial order committing an accused for psychiatric examination can be successfully attacked only when its issuance was a clear abuse of the trial court’s discretion. Collateral attacks on such orders are not favored. The circumstances in which such relief on habeas corpus is available are qualified and limited. Yet we are satisfied that this case falls within those limited circumstances, and that discharge from the psychiatric examination was justified.
The judgment under review, rendered by the Judge of the Eighth Circuit Court District, is affirmed insofar as it discharged Beckwith from confinement in the hospital and from the custody of Dr. Jaquith for psychiatric examination as to present sanity. However, that judg[508]*508ment further awarded custody of appellee to the Sheriff of Ranldn County to await trial in the Circuit Court of Hinds County. Since we hold that the July 19 Hinds County order was erroneously entered, Beckwith now should be transferred to the sheriff of the county of indictment. Accordingly, the habeas corpus judgment is amended in this respect, and it is ordered that the Sheriff of Rankin County deliver the accused, Beck-with, to the Sheriff of Hinds County for further proceedings under the indictment.
Affirmed as amended.
McGehee, C. J., and Lee, McElroy, Jones and Brady, JJ., concur.