
945 P.2d 673 (1997)
Richard S. JOHNSON, Plaintiff and Appellant,
v.
STATE of Utah, Defendant and Appellee.
No. 960168.
Supreme Court of Utah.
September 19, 1997.
Richard S. Johnson, pro se.
Jan Graham, Atty. Gen., Kenneth A. Bronston, J. Kevin Murphy, Asst. Attys. Gen., Salt Lake City, for defendant and appellee.
DURHAM, Justice:
Plaintiff Richard S. Johnson appeals from a summary judgment dismissing his petition for extraordinary relief (habeas corpus). The trial court dismissed Johnson's petition because it was barred by the statute of limitations and because all of Johnson's claims had been previously litigated; alternatively, the trial court held that the State was entitled to judgment as a matter of law on all of Johnson's claims. We affirm on the ground that the applicable statute of limitations bars Johnson's claims.
In 1986, Johnson was convicted of first degree murder and sentenced to life imprisonment. State v. Johnson, 774 P.2d 1141, *674 1142 (Utah 1989). On May 19, 1989, we affirmed Johnson's conviction on appeal. Id. at 1147. Johnson then filed a petition for habeas corpus in the United States District Court for the District of Utah; that court dismissed his petition on August 15, 1990, for failure to exhaust state remedies. On July 14, 1993, Johnson petitioned this court for mandamus, and we later reclassified his action as one for postconviction relief and transferred the case to the Utah Second District Court for Weber County. After the district court initially dismissed Johnson's claim as frivolous on its face, we reversed and remanded the case for an evidentiary hearing under rule 65B(b)(8) through (13).[1]
After hearing motions and arguments from both Johnson and the State, the trial court granted summary judgment to the State. In its ruling, the court found that Johnson's claim was barred by the four-year statute of limitations in section 78-12-25 of the Utah Code. It noted that the ninety-day statute of limitations for habeas corpus actions contained in the Code, Utah Code Ann. § 78-12-31.1 (1992), had been declared invalid under the Utah State Constitution by the court of appeals in Currier v. Holden, 862 P.2d 1357 (Ct.App.1993), cert. denied sub nom. McClellan v. Holden, 870 P.2d 957 (Utah 1994), and thus applied the general four-year limitation on civil actions found in section 78-12-25(3) (applying four-year statute of limitations to actions "not otherwise provided for by law"). The court also held that the State was entitled to judgment as a matter of law on the merits of each of Johnson's claims and that his claims were barred procedurally because each had been raised or could have been raised on direct appeal.
Johnson argues that the statute of limitations does not bar his claim because section 78-12-36 and this court's ruling in Smith v. Cook, 803 P.2d 788 (Utah 1990), act to toll the statute of limitations for prisoners. Johnson also argues that his attorney at trial and on appeal did not provide him with effective counsel, in violation of his Sixth Amendment rights. In addition, Johnson raises some of the same issues that he raised on his direct appeal (i.e., that the jury instructions regarding reasonable doubt and the lesser included offense of manslaughter violated due process).
In appeals from a dismissal of habeas corpus, we review the lower court's conclusions of law for correctness. See Fernandez v. Cook, 783 P.2d 547, 549 (Utah 1989). Johnson's claim that the statute of limitations does not bar his action is predicated on the belief that his cause of action accrued in 1986 when he was sentenced. At that time, section 78-12-36 (1977) and this court's decision in Smith, 803 P.2d 788, would have tolled the statute of limitations as long as Johnson remained imprisoned. As it read in 1986, the statute recognized imprisonment, along with minority and mental incompetency, as a disability that would toll the statute of limitations if the disability is present "at the time the cause of action accrued." Utah Code Ann. § 78-12-36 (1977). The statute was obviously intended to prevent a person from losing the opportunity to bring a claim where circumstances precluded either proper notice or a realistic effort to pursue the claim.
In practice, strict application of this statute would nullify any statute of limitations for habeas corpus actions. Because the purposes of habeas corpus actions "are to obtain immediate relief from illegal confinement, to liberate those who may be imprisoned without sufficient cause, and to deliver them from unlawful custody," 39 Am.Jur.2d Habeas Corpus § 1 (1968) (citations omitted), tolling the statute of limitations for someone in prison would inherently void any statutory time limit on bringing this action, because persons not imprisoned would have no reason to bring a habeas corpus claim.[2]
*675 Despite these difficulties, this court held in 1990 that section 78-12-36 should be applied even to prisoners seeking extraordinary relief from their criminal convictions. The court reasoned that the clear language of the statute and the principle that any ambiguity in the law will be resolved in favor of a criminal defendant forbade excluding habeas corpus actions from the tolling provisions of section 78-12-36. Smith, 803 P.2d at 791. We need not reexamine that ruling here because of our conclusion that Johnson's cause of action did not arise at the time of his conviction.
Under Utah law, a statute of limitations does not apply until the cause of action accrues. See Utah Code Ann. § 78-12-1; DOIT, Inc. v. Touche, Ross & Co., 926 P.2d 835, 843 (Utah 1996). "As a general rule, a cause of action accrues when a plaintiff could have first filed and prosecuted an action to successful completion." Id. Stated differently, the statute of limitations will not apply until all elements necessary to bring the action are present. See Warren v. Provo City Corp., 838 P.2d 1125, 1128-29 (Utah 1992) ("Generally, a cause of action accrues and the relevant statute of limitations begins to run `upon the happening of the last event necessary to complete the cause of action.'" (quoting Myers v. McDonald, 635 P.2d 84, 86 (Utah 1981))). Thus, Johnson's cause of action accrued only when all elements to bring his claim successfully were present.
A habeas corpus action cannot be raised until other forms of relief, including direct appeal, have been exhausted, absent unusual circumstances. See Gerrish v. Barnes, 844 P.2d 315, 319 (Utah 1992) ("[H]abeas corpus is not to be used to circumvent regular appellate review."); Jensen v. DeLand, 795 P.2d 619, 620 (Utah 1989); Hurst v. Cook, 777 P.2d 1029, 1034 (Utah 1989). Instead of alleging unusual circumstances and pursuing habeas corpus in a collateral action, Johnson pursued a direct appeal following his conviction.
Johnson's current petition is governed by rule 65B of the Utah Rules of Civil Procedure, which states that petitions for extraordinary relief, including relief from wrongful restraints of personal liberty (e.g., habeas corpus), are available only "[w]here no other plain, speedy and adequate remedy is available." Because Johnson could not petition for habeas corpus until after he availed himself of the remedy of direct appeal from criminal conviction, his action for habeas corpus did not accrue until after that appeal was decided.
Furthermore, the issues Johnson raises in his petition for habeas corpus undermine the contention that his action could have accrued prior to the disposition of his appeal. A petition for habeas corpus is appropriate only where the petitioner presents issues that he or she could not have raised on appeal, except where good cause is shown. See Fernandez, 783 P.2d at 549; Hurst, 777 P.2d at 1037; Andrews v. Morris, 607 P.2d 816, 822 (Utah 1980). Johnson argues that he is entitled to bring an action for habeas corpus because he is raising the issue of ineffective counsel and the same attorney who represented him at trial also represented him on appeal. This argument undermines Johnson's claim that his cause of action for habeas corpus arose when he was convicted, prior to the 1987 deletion of prisoners from the tolling statute. In Fernandez, 783 P.2d at 549, we held that where the same attorney allegedly gave ineffective counsel both at trial and on appeal, this may serve as a basis for a habeas corpus action under the Sixth Amendment of the United States Constitution. However, if Johnson's claim rests upon the ineffectiveness of his attorney on appeal, then his cause of action could not have accrued prior to the disposition of his appeal.
For these reasons, we find that Johnson's cause of action for habeas corpus did not accrue until his direct appeal was decided by this court on May 19, 1989. See Johnson, 774 P.2d 1141. Because this decision occurred after the legislature's deletion of imprisonment as a disability that tolls the statute of limitations under section 78-12-36, the trial court correctly held that Johnson's claim was time-barred.
We recognize that the ninety-day statute of limitations applicable to habeas corpus actions has been declared unconstitutional. *676 See Currier, 862 P.2d 1357 (holding that ninety-day statute of limitations on habeas actions is unreasonable limitation that violates article I, section 11 of Utah Constitution); see also Renn v. Utah State Bd. of Pardons, 904 P.2d 677, 681 (Utah 1995) (upholding court of appeals' ruling that petition for habeas corpus was not barred by statute of limitations because section 78-12-31.1 had been declared unconstitutional by Currier). However, neither this court nor the court of appeals has held that any statute of limitations on habeas corpus petitions, no matter how long, would violate the Utah Constitution, nor has Johnson argued that the four-year statute of limitations is unconstitutional. In the absence of such a challenge or of another provision, therefore, we agree with the district court's finding that the limitation period for habeas corpus actions applicable to this case is four years.[3]See Utah Code Ann. § 78-12-25(3) (setting four-year statute of limitations on civil actions not otherwise provided for by law).
We decided Johnson's appeal on May 19, 1989. Johnson did not file his petition for habeas corpus until July of 1993. Therefore, Johnson's claim is barred by section 78-12-25(3) because he filed it more than four years after his cause of action accrued.
Because we find that Johnson's action is time-barred, we need not reach the merits of his other claims. Affirmed.
ZIMMERMAN, C.J., and HOWE and RUSSON, JJ., concur in Justice DURHAM's opinion.
STEWART, Associate C.J., concurs in the result.
NOTES
[1]  Rule 65B(b) has since been superseded by rule 65C.
[2]  For example, in 1979, the legislature enacted a ninety-day statute of limitations on habeas corpus actions without modifying the tolling statute to exclude habeas corpus actions. See Utah Code Ann. § 78-12-31.1. In 1987, the conflict in the two statutes was resolved when the legislature deleted the references to imprisonment in section 78-12-36. However, the 1987 amendment "appl[ies] only to causes of action that arise after [April 27, 1987] and ha[s] no retroactive application." 1987 Utah Laws ch. 19, § 6.
[3]  In 1996, the legislature passed a one-year statute of limitations for habeas corpus actions. The 1996 statute cannot apply retroactively and is not at issue in this case.
