Plaintiff, an inmate of the Oregon State Penitentiary, appeals an order dismissing his petition for a writ of habeas corpus. We affirm.
Plaintiff petitioned in the circuit court for a writ of habeas corpus and subsequently filed a replication as authorized by ORS 34.670. Defendant moved to dismiss the petition on the ground that the replication did not state ultimate facts sufficient to constitute a claim for relief.
Plaintiff does not contend that the replication was sufficient and concedes that dismissal is proper in most actions where the pleadings fail to state a cause for relief. His sole argument is that, pursuant to ORS 34.670, on a petition for habeas corpus he is nevertheless entitled to present evidence to establish a basis for relief.
ORS 34.670 provides:
“The plaintiff in the proceeding, on the return of the writ, may, by replication, signed as in an action, controvert any of the material facts set forth in the return, or the plaintiff may allege therein any fact to show, either that imprisonment or restraint of the plaintiff is unlawful, or that the plaintiff is entitled to discharge; and thereupon the court or judge shall proceed in a summary way to hear such evidence as may be produced in support of or against the imprisonment or restraint, and to dispose of the party as the law and justice of the case may require.”
Plaintiff focuses on the language of the statute that “the court or judge shall proceed in a summary way to hear * * * evidence” as a basis of his argument. The more critical language in the provision is that “the plaintiff may allege therein any fact to show, either that imprisonment or restraint of the plaintiff is unlawful, or that the plaintiff is entitled to discharge.” Alleging facts constituting a claim in the replication is a condition precedent to an evidentiary hearing on the writ. Plaintiff is not entitled to present evidence on a petition for habeas corpus unless his pleadings make factual allegations sufficient to support the requested relief.
This interpretation is confirmed by ORS 34.680:
“The plaintiff may move to strike the return, or the defendant may move to strike any new matter set forth in *26the replication of the plaintiff, or by proof controvert the same, as upon a direct denial or avoidance. The pleadings shall be made within such time as the court or judge shall direct, and they shall be construed and have the same effect as in an action.”
That section treats the replication as any other pleading which asserts a claim for relief, and, as such, it must state ultimate facts constituting a basis for the relief sought. See ORCP 18A.
Affirmed.