
470 P.2d 122 (1970)
Khalil Ben MAATALLAH, Appellant,
v.
WARDEN, NEVADA STATE PRISON, Respondent.
No. 6138.
Supreme Court of Nevada.
June 5, 1970.
James D. Santini, Public Defender and Jeffrey D. Sobel, Deputy Public Defender, Las Vegas, for appellant.
Harvey Dickerson, Atty. Gen., and Michael L. Melner, Deputy Atty. Gen., Carson City, for respondent.

OPINION
THOMPSON, Justice.
In 1965 the appellant was charged with murder, and by separate proceeding was found insane and unable to stand trial. Accordingly, he was committed to the Nevada state hospital for treatment. Two years later a district court directed his transfer to the Nevada state prison to be there confined until further order. His *123 transfer was authorized by NRS 178.425[1] and was prompted by the fact that the hospital did not have adequate facilities to confine him since he was considered dangerous. This proceeding for habeas relief rests on the proposition that he is not receiving treatment at the prison and is there confined as a criminal without having been convicted of a crime. The district court denied his petition out-of-hand. The court refused to receive evidence to determine whether the treatment contemplated by the statute was being furnished him. This appeal followed. We reverse the district court and direct that an appropriate evidentiary hearing take place.
1. The confinement of one who is mentally ill is primarily for the purpose of treatment, and secondarily for the safety of that person and others with whom he may come into contact. The statutory mandate is "detention and psychiatric treatment." Custody is vested in the superintendent of the hospital. The place of detention may be either the hospital or the prison  this because of a legislative judgment that hospital security facilities may prove to be inadequate in some cases. In either instance, however, treatment must accompany detention. Mentally ill patients are not to receive only custodial care. Here, the charge is that of imprisonment without treatment in violation of the statute and in derogation of fundamental constitutional rights. The merit of the charge cannot be assessed without an evidentiary hearing. Rouse v. Cameron, 125 U.S.App. D.C. 366, 373 F.2d 451 (1966).
2. Basic rights may be involved should the district court find that the petitioner is detained without treatment. Due process may forbid the confinement of a mentally ill person, not found guilty of a crime, without affording reasonable treatment. Indeed, such a person who has been found guilty may not be punished while he is insane. Krause v. Fogliani, 82 Nev. 459, 462, 421 P.2d 949 (1966); NRS 178.400. Mental illness is not a crime. Imprisonment for mental illness may be cruel and inhuman punishment banned by the Eighth Amendment and by art. 1, § 6 of the Nevada Constitution as well. Cf. Robinson v. California, 370 U.S. 660, 82 S.Ct. 1417, 8 L.Ed.2d 758 (1962). If treatment is not made available on a reasonable, nondiscriminatory basis, the requirements of equal protection may be involved. Nason v. Superintendent of Bridgewater State Hosp., 353 Mass. 604, 233 N.E.2d 908 (1968); Baxstrom v. Herold, 383 U.S. 107, 110-115, 86 S.Ct. 760, 15 L.Ed.2d 620 (1966). We here resolve none of these questions, but merely note their possible existence and the need for an evidentiary hearing on the charge asserted to disclose whether they are before the court. Rouse v. Cameron, supra; United States v. Jackson, 306 F. Supp. 4 (D.Ct.N.D.Cal.1969).
3. The district court was concerned with its ability to enter an effective order if the petitioner proved his claim. That concern was premature. The truth of the petitioner's claim must first be ascertained. We note, however, that the statute utilized to effectuate the petitioner's transfer from the state hospital to the state prison requires that psychiatric treatment accompany detention. Treatment is not a matter of discretion and apparently may be forced by appropriate order.
Reversed with direction to hold a hearing on the petition for relief.
COLLINS, C.J., and ZENOFF, BATJER, and MOWBRAY, JJ., concur.
NOTES
[1]  In relevant part the statute reads: "If the court finds the defendant insane, the judge shall order the sheriff to convey him forthwith * * * into the custody of the superintendent of the Nevada state hospital for detention and psychiatric treatment at the Nevada state prison or at the hospital until returned for trial * * *."
