
968 P.2d 388 (1998)
156 Or. App. 217
Raymond Eugene PAYTON, Appellant,
v.
S. Frank THOMPSON, Superintendent, Oregon State Penitentiary, Respondent.
96C-11959; CA A96059.
Court of Appeals of Oregon, En Banc.[*]
Argued and Submitted December 12, 1997.
Resubmitted July 8, 1998.
Decided September 30, 1998.
Jay Edwards, Salem, argued the cause and filed the brief for appellant.
Christine Chute, Assistant Attorney General, argued the cause for respondent. With her on the brief were Hardy Myers, Attorney General, and Virginia L. Linder, Solicitor General.
Resubmitted En banc July 8, 1998.
EDMONDS, Judge.
Plaintiff, an inmate in an Oregon prison, appeals from a judgment that dismissed his petition for a writ of habeas corpus under ORS 34.310 to ORS 34.730. We affirm.
Plaintiff filed his petition for a writ of habeas corpus on June 7, 1996, seeking release on parole. He argues that he has been illegally incarcerated since November 5, 1994. He challenges a 1994 order of the parole board that extended his release on parole by two years. After he filed his petition, he moved for summary judgment pursuant to ORCP 47. Defendant responded to the motion for summary judgment and also filed a motion to dismiss plaintiff's petition pursuant to ORS 34.680(1).[1] The trial court denied plaintiff's motion for summary judgment and granted defendant's motion to dismiss, resulting in this appeal.
For purposes of the motion to dismiss, plaintiff alleges and defendant does not contest the following facts. Defendant's custody *389 of plaintiff is pursuant to the sentence of the Klamath County Circuit Court of May 8, 1986, sentencing him to the custody of the Oregon Corrections Division (DOC) for life with a ten-year minimum sentence, as a result of a conviction for murder. Plaintiff was scheduled to be released on parole on November 5, 1994, but before that date, the parole board extended his parole release date by two years. In March 1996, plaintiff's psychological status was re-evaluated, and the evaluator determined that he suffers from a "Mixed Personality Disorder with antisocial features and much over controlled aggression and hostility" and that he is "a danger." One day before plaintiff filed this petition in the circuit court, the parole board, relying on the March evaluation coupled with the other information that it had, concluded that plaintiff had "a severe emotional disturbance that constitute[d] a danger to the health or the safety of the community." Consequently, the parole board postponed plaintiff's release on parole until October 5, 1998, under the criteria for release on parole that were in existence at the time that plaintiff committed his crime.
Plaintiff asserts that the parole board's refusal to release him on parole in November 1994 violated the ex post facto clauses of the Oregon and federal constitutions because the parole board at that time relied on the legal criteria in ORS 144.125(3)(a) as amended in 1993 to extend his parole date. He argues that it should have applied the criteria for release on parole that were in effect at the time that he committed his crime. See Meadows v. Schiedler, 143 Or.App. 213, 924 P.2d 314 (1996) (holding that the retroactive application of the 1993 amendments to ORS 144.125(3) results in an ex post facto violation). According to plaintiff, the parole board was required to release him on parole on November 5, 1994, after it received a psychological report that stated that he would be a reasonable risk on parole. Therefore, he concludes that he is now entitled to be released on parole. Defendant counters that, even if plaintiff is correct about the unconstitutionality of the parole board's 1994 order, the parole board's 1996 order, which was decided under the appropriate criteria, superseded the 1994 order before plaintiff filed his petition.
We begin our analysis of the parties' arguments by reviewing the general principles of habeas corpus under the circumstances alleged by plaintiff. A habeas corpus writ commands a custodian to bring a petitioner before the court to inquire into the legality of imprisonment when the petitioner alleges that he is unlawfully imprisoned or when he "alleges other deprivations of [his] legal rights of a kind which, if true, would require immediate judicial scrutiny" and where there is no other available, timely remedy. Penrod/Brown v. Cupp, 283 Or. 21, 28, 581 P.2d 934 (1978). In Meadows, we said that if the plaintiff proves on remand to the circuit court that the order postponing parole was made under the 1993 version of ORS 144.125(3), the remedy would be to direct the parole board to order plaintiff's release unless it determined that, under the version of the statute in effect at the time that the plaintiff committed his crime, the plaintiff's parole should be postponed. 143 Or.App. at 221, 924 P.2d 314.
In this case, plaintiff alleges that the parole board was required to release him on parole from defendant's custody in 1994 and that he is entitled to immediate release. In that context, the remedy that he seeks contemplates inquiry into the legality of imprisonment or restraint at the time of the filing of the petition under ORS 34.700(1). That statute provides:
"If it appears that the party detained is imprisoned or restrained illegally, judgment shall be given that the party be discharged forthwith; otherwise, judgment shall be given that the proceeding be dismissed and the party remanded."
It necessarily follows that the proper inquiry in this case is whether plaintiff is entitled to release at the time that he filed his petition. Relief is not available if plaintiff's incarceration was lawful at the time that the remedy of habeas corpus was sought, even if the imprisonment was unlawful for an unrelated reason at some prior time.[2]
*390 Here, plaintiff was serving a life sentence when he filed his petition for a writ of habeas corpus on June 7, 1996. By that time, the 1994 release date was a legal nullity. Before the date for release in 1994 occurred, the order for release had been superseded. Plaintiff's custodial status on June 7, 1996, was pursuant to his life sentence, which had not been completed. The only order regarding release on parole in effect at that time was a 1996 order that provided for release in October 1998. Plaintiff's petition does not allege that the 1996 order constituted an ex post facto application. On these allegations and facts, the remedy of habeas corpus is not available to plaintiff because he has not demonstrated that he was entitled to release from custody on June 7, 1996. Consequently, the trial court did not err in dismissing his petition.[3]
Affirmed.
WARREN, Judge, dissenting.
As in Jones v. Thompson, 156 Or.App. 226, 968 P.2d 380 (decided this date), the majority fails to understand or apply the collateral consequences aspect of the mootness doctrine. As a result, it incorrectly affirms the trial court's dismissal of plaintiff's habeas corpus petition. Plaintiff's current incarceration is a collateral consequence of the 1994 order of the Board of Parole and Post-Prison Supervision, the order whose validity he attacks in his petition. Whether he filed his petition while the 1994 order was in effect or at some later date, that order remains the foundation of his current incarceration, and his attack on it is not moot. I dissent from the majority's contrary decision.
Plaintiff was originally scheduled to be released on parole on November 5, 1994.[1] Before his release date, the Board, purporting to act under the authority of ORS 144.125(3)(a), as amended in 1993, extended his parole date by two years. In this petition for habeas corpus, plaintiff argued that the Board's reliance on the amended statute in entering the 1994 order violated the ex post facto clauses of the Oregon and federal constitutions. He also alleged that, at the time of the order, he had received a favorable psychological report and that he was therefore entitled to an immediate release on parole. See ORS 144.125(3) (1991) (requiring existence of psychiatric or psychological diagnosis and Board finding present severe emotional disturbance and dangerousness as prerequisite to postponing parole release date). On June 6, 1996, the Board, relying in part on a March 1996 report from a different psychologist, extended plaintiff's release date an additional two years, until October 1998. Plaintiff filed this petition for habeas corpus on June 7, 1996.[2]
*391 In his petition for habeas corpus, plaintiff asserted that he was unlawfully imprisoned and restrained of his liberty. He specifically alleged that "I had a release date, which was on 11/5/94[.] And since that date I have been illegally incarcerated. * * * I had a release date, and I received a `good psychological evaluation.' * * * Prior to [the 1993 amendments to ORS 144.125(3) ] Dr. Shellman's evaluation of me would have left the Parole Board no choice, they would been forced to release me on 11/5/94." Plaintiff, thus, challenges his incarceration for the entire period after November 5, 1994; the legal basis for his challenge is the alleged invalidity of the 1994 order.
Under the collateral consequences rule that I described in my dissent in Jones, plaintiff's challenge is not moot if his present incarceration is tied to the 1994 order. Plaintiff alleges, and the state does not presently deny, that the Board had to release him in 1994 if that order was invalid. Whether petitioner's allegations in this respect are correct is something that the trial court should be allowed to determine on remand. If they are correct, all further incarceration is a collateral consequence of the 1994 order, and plaintiff has satisfied the requirement that he show that his incarceration was illegal at the time that he filed the petition. The state has not shown that the petition is moot.
That conclusion is consistent with our previous cases. In Smith v. Board of Parole, 143 Or.App. 408, 922 P.2d 1276, rev. den. 324 Or. 487, 930 P.2d 852 (1996), there was no order based on ORS 144.125(3) when the plaintiff filed the petition, and the plaintiff did not make an issue at trial of the Board's subsequent order that relied on that statute. Instead, he first attacked that order on appeal. We declined to consider the attack, not on mootness grounds but for lack of preservation.
In Meriweather v. Board of Parole, 140 Or.App. 415, 915 P.2d 467 (1996), the plaintiff had a parole release date of March 27, 1993. The Board, on April 20, 1990, found that his dangerous condition was not in remission and that his parole date should continue to be March 27, 1993. The plaintiff then filed a habeas corpus petition attacking that order. While the case was pending, and before March 27, 1993, the Board held a new hearing and entered an order in which it found that his dangerous condition was not in remission and extended his parole release date to March 27, 1995. We thereafter entered an order limiting the issues on review to those other than the parole release date. Subsequently, we determined that the one remaining issue, concerning the Board's finding of April 20, 1990, was moot because the subsequent order had superseded it. 140 Or.App. at 419-20, 915 P.2d 467.
The essential distinction between Meriweather and this case is that, in Meriweather, the Board extended the parole release date, based on a new hearing and new information, before the original release date and, thus, before the challenged order actually had the effect of denying plaintiff's release. By the time the original parole date arrived, there was a new order that was in itself a sufficient basis for denying his release. Thus, there were no remaining consequences of the April 20, 1990, order by the time the case reached us; the extension of the March 27, 1993 parole release date was based entirely on events that occurred after that order. In contrast, in this case the Board entered the 1996 order after the 1994 order took effect; indeed, the 1996 order could not have existed without the 1994 order, because without that order the Board would not have had the authority to extend plaintiff's confinement. Meriweather does not affect this case.
On the merits, I would hold that the court erred in dismissing the petition. In Meadows v. Schiedler, 143 Or.App. 213, 924 P.2d 314 (1996), we held that applying the 1993 amendments to ORS 144.125(3) to persons who committed crimes before the effective date of the amendments would violate the ex post facto clauses of the state and federal constitutions. More recently, in Merrill v. *392 Johnson, 155 Or.App. 295, 964 P.2d 284 (1998), we held that, under the pre-1993 version of the statute, the Board could not extend a parole date unless it found, based at least in part on a psychiatric or psychological diagnosis, that the prisoner suffered from a "present severe emotional distress." In this case, plaintiff alleges that the only psychological examination available to the Board when it issued the 1994 order was favorable to him and that the Board was required to release him. Although the state asserts that the Board could consider all the evidence, not just the diagnosis, in deciding whether plaintiff's condition satisfied the statutory standard, it does not assert that the 1994 order made the necessary finding. If the order did not, or if the evidence before the Board would not support that conclusion, the 1994 order was invalid and plaintiff was entitled to release at that time. In that case, there would be no legal basis on this record for his continued confinement. We should remand the case to the trial court so it can resolve these essential factual questions.
For these reasons, I dissent.
ARMSTRONG and WOLLHEIM, JJ., join in this dissent.
NOTES
[*]  Linder, J., not participating.
[1]  ORS 34.680(1) provides:

"The defendant may, before the writ issues, move to deny the petition on the grounds that the petition fails to state a claim for habeas corpus relief. The defendant may, at any time after the writ issues, move to dismiss the writ on the grounds that the pleadings, including the petition, the return, the replication, if any, and any supporting evidence, demonstrate that plaintiff has failed to state or establish a claim for habeas corpus relief."
[2]  Several jurisdictions have held similarly under varying fact situations, including United States v. Kenton, 287 F.2d 534, 536 (2nd Cir.1961), cert. den. 368 U.S. 846, 82 S.Ct. 75, 7 L.Ed.2d 44 (1961) (holding that a delay of 113 days, after parolee was retaken for parole violation and before a hearing was held, was unreasonable, but that the delay did not render the hearing a nullity and did not render the subsequent confinement unlawful); United States v. Universita, 192 F.Supp. 154, 156 (S.D.N.Y.1961) (holding that an unreasonable delay of a preliminary examination hearing was unlawful; however, once the grand jury returned an indictment, petitioner was then in lawful custody and was not entitled to be released on a writ of habeas corpus); and Victoria v. Young, 80 Nev. 279, 392 P.2d 509 (Nev. 1964), overruled on other grounds, Shelby v. Sixth Judicial District Court, 82 Nev. 204, 414 P.2d 942 (Nev.1966).
[3]  The dissent would hold that the parole board's 1996 order was dependent on the validity of the 1994 order postponing his release and that because the 1994 order was unconstitutional, it necessarily follows that the 1996 order is also invalid, resulting in plaintiff's entitlement to the release on parole. The short answer to the dissent's argument is that the authority of defendant to incarcerate plaintiff is derived from the Klamath County judgment and not the parole board's failure to apply the appropriate release criteria. Jones v. Thompson, 156 Or.App. 226, 968 P.2d 380 (decided this date).
[1]  This statement of facts is based on the record before us and would not limit what the trial court might find based on a more complete record on remand.
[2]  In fact, plaintiff signed the petition on May 29, 1996, before the Board's June 6, 1996, order, and he presumably delivered it to the prison authorities shortly thereafter. The record does not show whether the court received the petition on or before the day that it filed it. There may be a question of when we should consider the case as being filed. Cf. Stull v. Hoke, 326 Or. 72, 948 P.2d 722 (1997) (civil complaint by prisoner is filed when court receives it), with Hickey v. OSP, 127 Or.App. 727, 874 P.2d 102 (1994) (prisoner's petition for review of disciplinary sanction is filed when delivered to prison authorities). Because I think that plaintiff's challenge to the 1994 order is not moot without regard to whether he filed it before or after the Board entered the 1996 order, I do not need to consider that question.
