
51 N.W.2d 891 (1952)
155 Neb. 410
STAPLEMAN
v.
HANN, Warden, et al.
No. 33123.
Supreme Court of Nebraska.
February 29, 1952.
Grover Stapleman, pro se.
Clarence S. Beck, Atty. Gen., Homer L. Kyle, Asst. Atty. Gen., for appellee.
Before SIMMONS, C. J., and MESSMORE, YEAGER, CHAPPELL, WENKE, and BOSLAUGH, JJ.
YEAGER, Justice.
Grover Stapleman, petitioner and appellant herein, on August 8, 1951, filed in the office of the clerk of the district court for Lancaster County, Nebraska, a petition for a writ of habeas corpus directed to Herbert H. Hann, Warden of the penitentiary of the State of Nebraska, respondent, and other named respondents.
At the time the petition was filed the petitioner was serving a sentence of eight years in the state penitentiary for the crime of rape of which he had been duly convicted in the district court for Hall County, Nebraska, which conviction had been affirmed by this court.
On August 14, 1951, one of the judges of the district court examined the petition and entered an order denying the writ and dismissing the petition on the ground that the petition did not state facts sufficient to constitute a cause of action for the allowance of a writ. Notice of appeal was duly filed by the petitioner.
The brief of appellant contains numerous assignments of error but the only question for determination is that of the sufficiency of the petition to state a cause of action, or in other words, did the petition contain sufficient allegations of fact which if taken as true would entitle him to discharge from his imprisonment.
The appropriate rule is that a petition for a writ of habeas corpus must state the facts which it is contended constitute the illegal restraint. It is not sufficient to allege that the petitioner is illegally restrained of his liberty. State ex rel. Distin v. Ensign, 13 Neb. 250, 13 N.W. 216; In re Application of Tail, 145 Neb. 268, 16 N.W.2d 161.
If on examination it is found that the petition fails to state a cause of action it is the duty of the district court to enter an order denying a writ. In re Application of Tail, 144 Neb. 820, 14 N.W.2d 840; In re Application of Tail, 145 Neb. 268, 16 N.W.2d 161; Jackson v. Olson, 146 Neb. *892 885, 22 N.W.2d 124, 165 A.L.R. 932; Swanson v. Jones, 151 Neb. 767, 39 N.W.2d 557; In re Application of Dunn, 150 Neb. 669, 35 N.W.2d 673; Truman v. Hann, 154 Neb. 501, 48 N.W.2d 418.
The petition which is much too lengthy to summarize herein contains no allegations of fact which if true would entitle petitioner to the relief prayed. The district court correctly so held and further correctly dismissed the petition.
The judgment is therefore affirmed.
Affirmed.
