
172 P.3d 842 (2007)
Jeffrey KOLODY, Appellant,
v.
STATE of Alaska, Appellee.
No. A-9332.
Court of Appeals of Alaska.
December 21, 2007.
David E. George, Anchorage, for the Appellant.
*843 Nancy R. Simel, Assistant Attorney General, Office of Special Prosecutions and Appeals, Anchorage, and Talis J. Colberg, Attorney General, Juneau, for the Appellee.
Before: COATS, Chief Judge, and MANNHEIMER and STEWART, Judges.

OPINION
MANNHEIMER, Judge.
Jeffrey Kolody was charged with several counts of controlled substance misconduct. On December 9, 2004, while these charges were pending, Kolody filed a petition for writ of habeas corpus. In this petition, Kolody contended that he was entitled to immediate release, and to dismissal of the charges against him, because his court-appointed attorney had neglected his case and had failed to give him competent representation.
Superior Court Judge Eric Smith denied Kolody's petition. Judge Smith noted that Kolody could pursue his complaints about his attorney by filing a motion or by otherwise seeking relief in his underlying (and still pending) criminal case. Accordingly, Judge Smith concluded that Kolody was not entitled to raise these complaints in a petition for writ of habeas corpus  because Alaska Civil Rule 86(n) declares that the writ of habeas corpus can not be used as "a substitute for . . . any remedy incident to the proceedings in the trial court".
Kolody (who is now represented by a different attorney) appeals this ruling.
In his habeas corpus petition to the superior court, and again in his brief to this Court, Kolody asserts that his trial attorney's incompetence and lack of zeal has led to Kolody's loss of several constitutional and statutory rights. But the underlying merit of these claims has never been litigated, and Judge Smith has issued no ruling on any of these claims.
The sole issue presented in this appeal is whether Judge Smith was correct when, pursuant to Civil Rule 86(n), he dismissed Kolody's habeas petition on the ground that Kolody was entitled to raise these complaints about his attorney in the normal course of the underlying criminal proceedings.
(While this appeal was pending, Kolody and the State agreed to resolve the underlying criminal case by having Kolody enter a plea of no contest to one count of second-degree controlled substance misconduct. Following an unsuccessful attempt to withdraw that plea, Kolody was convicted and sentenced to a presumptive term of five years' imprisonment. Kolody has appealed that judgement and sentence, see Kolody v. State, File No. A-9646, and his appeal is currently in the briefing stage.)
We conclude that Judge Smith was correct to dismiss Kolody's petition for writ of habeas corpus. Alaska Civil Rule 86(n) codifies the rule that the writ of habeas corpus is an extraordinary remedy, and that litigants are not allowed to seek habeas corpus relief if they are entitled to seek relief using normal trial court or appellate procedures.
We note that this rule of Alaska law is the same as the corresponding rule under federal law. The United States Supreme Court has declared that "the writ of habeas corpus is not intended to serve the office of a writ of error even after [the] verdict [in a criminal trial]; and, for still stronger reasons, it is not available to a defendant before trial, except in rare and exceptional cases".[1] Thus, in federal court, a criminal defendant must pursue other available remedies  which generally means following the orderly course of a trial and an appeal  before resorting to the writ of habeas corpus.[2]
Here, Kolody wanted to challenge his attorney's performance in a pending criminal case. He could have sought relief directly from the trial court in that case. Accordingly, he was not entitled to file a petition for writ of habeas corpus.
The judgement of the superior court is AFFIRMED.
NOTES
[1]  Johnson v. Hoy, 227 U.S. 245, 247, 33 S.Ct. 240, 241, 57 L.Ed. 497 (1913).
[2]  Johnson, 227 U.S. at 247, 33 S.Ct. at 241.
