NATURE OF CASE
This is an appeal from a denial of a petition for a writ of habeas corpus in which Cary Rehbein seeks relief on the grounds that his trial counsel was ineffective and that Rehbein is a hermaphrodite wrongfully confined in a male prison. The Lancaster County District Court sustained the State’s demurrer and dismissed Rehbein’s petition for failure to state a claim for habeas corpus.
SCOPE OF REVIEW
When habeas corpus is used to test the validity of adult criminal detention, factual issues are to be reviewed as in actions at law.
Bradley
v.
Hopkins,
The findings of a trial court in a law action in which the court served as the finder of fact have the effect of a verdict and will not be set aside unless clearly wrong.
Hilliard
v.
Robertson,
To the extent issues of law are presented, an appellate court has an obligation to reach independent conclusions irrespective of the determinations made by the court below.
Doe
v.
Zedek,
FACTS
On May 30, 1997, Rehbein filed a “Petition for Writ of Habeas Corpus.” The State demurred to the petition on the basis that the allegations contained in the petition did not state facts sufficient to constitute a cause of action and that the petition did not have attached to it a copy of Rehbein’s commitment and detention order, as required by Neb. Rev. Stat. § 29-2801 (Reissue 1995). Subsequently, Rehbein filed numerous pleadings, including a “Motion to File Amendment to Original Filing” and a “Motion for Hearing of Evidence to Support Action in Docket 556 Page 153 in Judge McGinn[’]s Court and Motion to Transport Person From Correction.” Rehbein also filed a “Motion to Go to Retrial on a Hearing for State Habe[a]s Filing and Release for Unlawful Incar[c]eration.”
On November 17, 1997, the district court sustained the State’s demurrer, finding that Rehbein’s petition failed to allege
*409
facts constituting a cause of action for habeas corpus. The district court noted that this court had already considered and denied granting relief to Rehbein regarding five of Rehbein’s allegations. See
State
v.
Rehbein,
ASSIGNMENTS OF ERROR
Those claims which were presented to the district court and properly assigned as error on appeal are as follows: (1) The district court erred in denying Rehbein’s petition for habeas corpus relief, because his guilty plea at trial was not entered into voluntarily, as he was under the influence of drugs, and (2) no presentence investigation was performed, so the trial court sent him to a male prison even though he is “more female than male” and, thus, violated his right under the Eighth Amendment of the U.S. Constitution to be free from cruel and unusual punishment.
ANALYSIS
Habeas corpus is a special civil proceeding providing a summary remedy to persons illegally detained. See
In re Application of Tail, Tail
v.
Olson,
A writ of habeas corpus in this state is quite limited in comparison to those of federal courts, which allow a writ of habeas corpus to a prisoner when he is in custody in violation of the federal Constitution, law, or treaties of the United States.
Case
v.
State, 177
Neb. 404,
Only a void judgment may be collaterally attacked.
Mayfield v. Hartmann, supra.
Where the court has jurisdiction of die parties and the subject matter, its judgment is not subject to collateral attack.
Id.
A writ of habeas corpus will not lie to discharge a person from a sentence of penal servitude where the court imposing the sentence had jurisdiction of the offense, had jurisdiction of the person of the defendant, and the sentence was within the power of the court to impose.
Anderson
v.
Gunter,
Rehbein's initial petition for writ of habeas corpus asserted that his imprisonment was illegal because (1) his trial counsel entered a plea of guilty without Rehbein being present; (2) at the time the plea was entered, Rehbein was on a psychotropic drug and was totally unable to assist in the preparation of his own defense; (3) he received ineffective assistance of counsel; (4) there was no factual basis for his plea; (5) the plea was not knowingly and freely entered; and (6) Rehbein is a hermaphrodite, being “more female than male,” and therefore is illegally confined to a male facility.
In
Sileven v. Tesch,
In other words, the regularity of the proceedings leading up to the sentence in a criminal case cannot be inquired into on an application for writ of habeas corpus, for that matter is avail
*411
able only in a direct proceeding. See
id.
In a petition for writ of habeas corpus, if the plaintiff sets forth facts which, if true, would entitle him or her to discharge, then the writ is a matter of right, the plaintiff should be produced, and a hearing should be held thereon to determine questions of fact presented. If the plaintiff fails to show by the facts alleged in the petition that he or she is entitled to relief, then the relief is denied. See
Lingo
v.
Horn,
Here, the State filed a “return,” or showing, in response to Rehbein’s petition for a writ of habeas corpus. The State claimed that Rehbein’s petition should be dismissed because the allegations contained therein did not state facts sufficient to constitute a cause of action and because Rehbein had failed to attach a copy of his commitment and detention order, as required by § 29-2801. The district court treated the State’s response as a demurrer.
In
Almarez
v.
Hartmann,
On a motion to quash a writ of habeas corpus, as in a demurrer, the allegations of the petition are deemed admitted, and the usual presumptions in support of the jurisdiction of a court of general jurisdiction whose proceedings are collaterally attacked will be made. See id. Where the petition is not sufficient to warrant discharge, it should be quashed. Id.
In his petition, Rehbein alleges that his guilty plea was not entered voluntarily and that, as a consequence, Ids trial counsel was ineffective in allowing him to plead. This complaint does not question the jurisdiction of the trial court over the crime or *412 the defendant. Neither does the complaint question the authority of the trial court to impose the sentence given, and thus, it may not be raised in a writ of habeas corpus.
Next, Rehbein claims that he possesses “46xx” chromosomes and, thus, is a hermaphrodite. He argues that his genetic makeup is more female than male and that he should not be housed in a male prison. We reiterate that habeas corpus will not lie to discharge a person from a sentence of penal servitude where the court imposing the sentence has jurisdiction over the offense and the defendant and the sentence was within the power of the court to impose.
Anderson
v.
Gunter,
We express no opinion as to whether Rehbein may challenge his confinement through a writ of mandamus or other method. See 68 Neb. Admin. Code, ch. 9, § 004 (1987) (directs Department of Correctional Services to assign female inmates to Nebraska Center for Women). See, also,
Long
v.
Nix,
CONCLUSION
The district court’s dismissal of Rehbein’s petition for a writ of habeas corpus is affirmed.
Affirmed.
