
800 P.2d 792 (1990)
104 Or.App. 271
Rick BIRD, Appellant,
v.
Manfred (Fred) MAASS, Superintendent, Oregon State Penitentiary, Respondent.
90C-10576; CA A64583.
Court of Appeals of Oregon.
Submitted on Record and Briefs September 17, 1990.
Decided November 7, 1990.
*793 Elaine B. Oliver, and Swaim & Betterton, P.C., Salem, filed the brief, for appellant.
Dave Frohnmayer, Atty. Gen., Virginia L. Linder, Sol. Gen., and Ann Kelley, Asst. Atty. Gen., Salem, filed the brief, for respondent.
Before BUTTLER, P.J., and NEWMAN and DEITS, JJ.
DEITS, Judge.
Plaintiff appeals the dismissal of his claim for habeas corpus relief. The question is whether the court may dismiss a case on the basis of the petition after the court has issued the writ, but before the pleadings have been filed. We reverse.
Plaintiff, an inmate at Oregon State Penitentiary, filed a habeas corpus petition claiming that defendant had denied him access to his attorney by failing to photocopy some papers that he wished to send to his attorney. The trial court allowed the writ under ORS 34.370.[1] Before further proceedings were held, plaintiff moved to disqualify the judge who had issued the order allowing the writ. The judge was disqualified.[2] The matter was then assigned to another judge, who dismissed the case for lack of jurisdiction.
Defendant argues that, once a court allows a writ of habeas corpus, it should be issued without delay, and no other action may be taken on the petition. We agree. Habeas corpus provides an expedited procedure for prisoners who claim that they are being restrained unlawfully. ORS 34.310. The function of a petition is to obtain the issuance of a writ. Bedell v. Schiedler, 307 Or. 562, 566, 770 P.2d 909 (1989). Strict pleading rules do not apply; a petition may be informal, if the defects are minor. Gage v. Maass, 306 Or. 196, 202, 759 P.2d 1049 (1988); State ex rel. Sorensen v. Baird, 201 Or. 240, 247-48, 269 P.2d 535 (1954). When a petition is filed, the court must review it immediately. If it appears from the petition and any *794 documents attached to it that habeas corpus is not an appropriate remedy, the court may dismiss the petition at that time. Penrod/Brown v. Cupp, 283 Or. 21, 581 P.2d 934 (1978). Otherwise, the court must allow the writ. ORS 34.370.
Once a writ is issued, the defendant must obey it by filing a return and, after the return is filed, the court must resume its scrutiny. ORS 34.490; ORS 34.580. The plaintiff has the right to file a replication that disputes any facts in the return or that alleges new facts. ORS 34.670. By agreement of the parties, the petition may serve as the replication. Gage v. Maass, supra, 306 Or. at 202, 759 P.2d 1049; State ex rel. Sorensen v. Baird, supra, 201 Or. at 247, 269 P.2d 535. The return and replication are the pleadings. After the pleadings have been filed, the case may be set for hearing, if there are any disputed fact questions. ORS 34.670. However, if the facts alleged, even if true, would be insufficient to warrant habeas corpus relief, the court should dismiss the writ without hearing the merits. Lane v. Maass, 309 Or. 671, 790 P.2d 1137 (1990); Keenan v. Peterson, 307 Or. 323, 767 P.2d 441 (1989).
Here, the court dismissed the case after the writ was issued, but before the return and replication were filed. The Supreme Court has held that, once the writ is issued, the petition ceases to exist. Lane v. Maass, supra, 309 Or. at 676, 790 P.2d 1137. Therefore, after the writ had been issued in this case, the trial court no longer had anything before it on which it could determine jurisdiction. Thus, the trial court erred in dismissing the case after the writ issued and before the pleadings were filed.
Plaintiff also argues that the trial court erred, because the petition met minimum jurisdictional requirements for habeas corpus relief. However, the merits of the case are not before us at this time. Once the pleadings have been filed, the trial court may determine the proper disposition.
Reversed and remanded for further proceedings not inconsistent with this opinion.
NOTES
[1]  ORS 34.370 provides, in part:

"The court or judge to whom the petition is presented must allow the writ without delay, unless it appears from the petition itself, or from the documents annexed thereto, that the person for whose relief it is intended is by the provisions of ORS 34.310 to 34.730 prohibited from prosecuting the writ. Upon the filing of the petition and the order of allowance with the clerk, the clerk shall issue the writ immediately in accordance therewith."
[2]  The state did not challenge the filing of the motion to disqualify the judge after that judge had ruled on the petition. See ORS 14.260; ORS 14.270.
