In an appeal as of right from a judgment of the court of appeals involving an extraordinary writ, this court will consider the case as if the action originally had been filed here. See State, ex rel. Halloran, v. Zapatony (1984), 15 Ohio St. 3d 73, at fn. 2.
The facts in this case are undisputed'. The appellee was held in the custody of the Sheriff of Cuyahoga County pursuant to the revocation order. That order resulted from the appellee’s conviction on a second charge two years after probation was imposed. The parties differ, *35however, as to whether the trial court was retroactively divested of jurisdiction to direct appellee’s confinement and whether collateral attack through habeas corpus is the proper means to test the validity of his incarceration.
Appellee argues that although the court had jurisdiction at the time of the hearing, it lost jurisdiction when the 1982 conviction was reversed and the charges were dropped, thus rendering the revocation proceedings a nullity.
The state contends that “[w]hen a judgment revoking probation rests on a prior criminal conviction, such a judgment does not become null and void when the prior criminal conviction is reversed on appeal. Said judgment of probation revocation remains a valid judgment and cannot be attacked collaterally by a writ of habeas corpus.” The state acknowledges that “[t]he judgment revoking petitioner’s probation rested upon the continued validity of the under lying [sic] conviction.” It contends, however, that “[o]nce the under lying [sic] conviction and subsequent dismissal was [sic] removed, the judgment revoking probation still remained a valid judgment, although it was subject to direct attack as being a voidable judgment. * * *”
In In re Lockhart (1952), 157 Ohio St. 192 [47 O.O. 129], paragraphs two and three of the syllabus, this court held:
“2. The extraordinary remedy of habeas corpus is for the purpose of determining the legality of the restraint or custody under which a person is held.
“3. If the judgment or order under which an accused is imprisoned is a nullity, habeas corpus is the recognized and approved remedy to secure his release.”
In Stahl v. Shoemaker (1977), 50 Ohio St. 2d 351, at 354 [4 O.O.3d 485], we observed: “* * * Although the writ is available to parties who unlawfully are deprived of their liberty, it is unavailable to those deprived of their freedom pursuant to a lawful criminal sentence.”
It, of course, is conceded that at the time appellee’s probation was revoked, the court had jurisdiction. But when the court of appeals reversed the conviction and remanded the case, it placed appellee in the position of one not convicted. Appellee, then, was clothed with the presumption of innocence. The probation revocation was premised on a judgment which later became a nullity. Consequently, the order was rendered ineffective and void.
While this court has not before considered an issue such as this, the court of appeals, in In re Anderson (1978), 55 Ohio App. 2d 199 [9 O.O.3d 346], addressed a related question. The court said at 201:
“The trial judge could not have foreseen the reversal and, therefore, acted in good faith when he had the prisoner returned to Cuyahoga County *36for the violation hearing. * * * However, the legal effect of the reversal, the remand, and the discharge * * * was to render the conviction in the second case a nullity. * * * All action taken in connection with the probation violation grounded on the second conviction was outside the jurisdiction of the sentencing court. [Citation omitted.]”
The trial court had a duty to terminate the unauthorized incarceration resulting from the reversal of the 1982 conviction. Appellee did make an appropriate motion to vacate the sentence, but the motion was not ruled upon, apparently because the trial court felt it lacked jurisdiction to do so. Such jurisdiction, however, was not lacking. In Van DeRyt v. Van DeRyt (1966), 6 Ohio St. 2d 31, at 36 [35 O.O.2d 42], we explained: “Although a court does not have inherent power at common law to make substantive amendments to its judgments after term * * * [citations omitted], it does have inherent power to vacate after term a judgment which is void ab initio * * *. A court has inherent power to vacate a void judgment because such an order simply recognizes the fact that the judgment was always a nullity. * * *”
We agree with the analysis of the court of appeals in the present case. It stated:
“* * * [W]e must find that a reasonable time for action by the trial court has now expired. His [appellee’s] continued detention in jail denies him minimal due process protection. He has no adequate alternative remedy at law. He cannot appeal because the trial court has made no ruling on his motion. He cannot seek a discretionary delayed appeal from the original probation violation order, because the record there would show a second conviction to support the revocation order.
“* * * Procedendo could cause the trial court to rule, so that an appealable order might result. However, we know of no authority which precludes habeas corpus where procedendo might lead to an order which thereafter permits an appeal.”
Although the state argues that appellee’s remedy is via direct attack on his detention, we cannot imagine what form that attack could take. Appellee has no apparent remedy at law.
In Carafas v. LaVallee (1968), 391 U.S. 234, the United States Supreme Court, with respect to the writ of habeas corpus, at 238 commented: “* * * Its province, shaped to guarantee the most fundamental of all rights, is to provide an effective and speedy instrument by which judicial inquiry may be had into the legality of the detention of a person.” (Emphasis added.) Indeed if procedendo should be required instead of habeas corpus, appellee would be compelled to bring two actions instead of one, resulting in an even longer period of unlawful confinement. Because procedendo is an extraordinary and not a legal remedy, it is not necessary that appellee jump through such procedural hoops to secure his release.
“* * * The very nature of the writ [of habeas corpus] demands that it be administered with the initiative and flexibility essential to insure that *37miscarriages of justice within its reach are surfaced and corrected.”- Harris v. Nelson (1969), 394 U.S. 286, 291. Therefore the judgment of the court of appeals is affirmed.
Judgment affirmed.
Celebrezze, C.J., Sweeney, Locher, Holmes, C. Brown, Douglas and Wright, JJ., concur.