
815 P.2d 1061 (1991)
120 Idaho 321
Larry Brad SANCHEZ, Petitioner-Appellant,
v.
Arvon J. ARAVE, Respondent.
No. 18086.
Supreme Court of Idaho, Boise, April 1990 Term.
July 29, 1991.
Larry Brad Sanchez, pro se.
Jim Jones, Atty. Gen., Timothy D. Wilson, Deputy Atty. Gen., Boise, for respondent.
JOHNSON, Justice.
In this appeal, Larry Brad Sanchez challenges the constitutionality of I.C. § 12-122. This statute requires the award of attorney fees in any habeas corpus action brought by a state penitentiary or county jail inmate, if the action was brought frivolously by the petitioner. We dismiss the appeal, because the issue was raised for the first time on appeal to this Court.

I.

THE BACKGROUND AND PRIOR PROCEEDINGS.
Sanchez filed a petition for writ of habeas corpus against Arvon Arave, warden of the Idaho State Correctional Institution, and the Idaho Board of Correction (the Board). The petition challenged the quality of medical treatment Sanchez was receiving after having been committed to the custody of the Board pursuant to sentencing in a criminal case.
Following a hearing at which Sanchez was represented by a public defender and both Arave and the Board were represented by the office of the Idaho Attorney General, the magistrate judge found that Sanchez was receiving adequate medical attention and that the matter had been brought frivolously as defined in I.C. § 12-122. The magistrate judge dismissed the petition and awarded Arave costs and attorney fees. The deputy attorney general who had represented Arave and the Board at the hearing filed a memorandum of costs and fees referring to I.C. § 12-122 and I.R.C.P. 54(d)(5). The magistrate judge did not, however, enter an order specifying the amount of costs and attorney fees awarded. The record does not contain any indication that Sanchez challenged the constitutionality of I.C. § 12-122 in the proceedings before the magistrate judge.
Sanchez then appealed the matter to a district judge. The notice of appeal stated that the appeal was from an order of the magistrate judge dismissing the petition for writ of habeas corpus and "the findings that this matter was frivolously brought and the awarding of attorney's fees and costs." During the appeal to the district judge, Sanchez was assisted by an inmate legal assistant.
Sanchez's brief on appeal to the district judge did not present the issue of the constitutionality of I.C. § 12-122, nor did the district judge address this issue in deciding *1062 the appeal. The district judge rejected the issues raised by Sanchez on appeal, but remanded the proceeding to the magistrate judge for the purpose of fixing the costs and fees. Sanchez then appealed to this Court.
Sanchez lists the following as the sole issue in this appeal:
Is I.C. § 12-122 a constitutional statute as applied in appellant's case?

II.

THE CONSTITUTIONALITY OF THE STATUTE WILL NOT BE CONSIDERED FOR THE FIRST TIME ON APPEAL.
Sanchez did not challenge the constitutionality of I.C. § 12-122 until the appeal to this Court. Under these circumstances, we will not consider the issue.
The longstanding rule of this Court is that we will not consider issues that are presented for the first time on appeal. E.g., Kinsela v. State, Dep't of Finance, 117 Idaho 632, 634, 790 P.2d 1388, 1390 (1990). Recently we applied the rule to dismiss the appeal in a case where the state asked us to rule on an issue that was not raised in the trial court. State v. Martin, 119 Idaho 577, 808 P.2d 1322 (1991).
The rationale for this rule was first stated by the Supreme Court of the Territory of Idaho in 1867:
It is for the protection of inferior courts. It is manifestly unfair for a party to go into court and slumber, as it were, on [a] defense, take no exception to the ruling, present no point for the attention of the court, and seek to present [the] defense, that was never mooted before, to the judgment of the appellate court. Such a practice would destroy the purpose of an appeal and make the supreme court one for deciding questions of law in the first instance.
Smith v. Sterling, 1 Idaho 128, 131 (1867).
In Johnson v. Diefendorf, 56 Idaho 620, 633, 57 P.2d 1068, 1073 (1936), the Court refused to discuss or decide the validity of a statute on grounds that were not pleaded or submitted to the trial court. In Oregon Shortline R.R. v. City of Chubbuck, 93 Idaho 815, 817, 474 P.2d 244, 246 (1970), the Court declined to decide whether a statute was unconstitutional when the issues had not been raised by the pleadings nor argued or decided in the trial court.
In Messmer v. Ker, 96 Idaho 75, 78, 524 P.2d 536, 539 (1974), the Court affirmed the granting of a new trial and then considered the constitutionality of a statute even though the issue had been raised for the first time on appeal. In doing so, the Court noted: "Constitutional issues may be considered for the first time on appeal if such consideration is necessary for subsequent proceedings in the case. I.C. § 1-205." Id. I.C. § 1-205 provides for the manner of disposition of appeals by this Court. It states that "if a new trial be granted, the court shall pass upon and determine all the questions of law involved in the case presented upon such appeal, and necessary to the final determination of the case." I.C. § 1-205.
Although the district judge in this case remanded the proceeding to the magistrate judge for the purpose of fixing the costs and attorney fees, no new trial or hearing has been ordered. Therefore, I.C. § 1-205 and Messmer are not applicable.

III.

CONCLUSION.
We dismiss the appeal and remand the case to the magistrate judge for the purpose of fixing the costs and attorney fees, as ordered by the district judge.
We award the respondent costs on appeal. No attorney fees were requested on appeal.
BAKES, C.J., and BOYLE and McDEVITT, JJ., concur.
BISTLINE, Justice, dissenting.
The majority opinion swiftly disposes of Larry Sanchez's challenge to the constitutionality of I.C. § 12-122 on the ground that Sanchez waived the issue by failing to raise it before the magistrate or the district *1063 court. The opinion states: "Sanchez's brief on appeal to the district court did not present the issue of the constitutionality of I.C. § 12-122, nor did the district judge address this issue in deciding the appeal... . Sanchez did not challenge the constitutionality of I.C. § 12-122 until the appeal to this Court. Under these circumstances, we will not consider the issue." These statements are grossly incorrect; Sanchez did in fact raise the constitutionality issue in his pro se appeal to the district court.
As his fourth issue on appeal to the district court Sanchez contended: "Should a prisoner filing pro se, unlearned in the understanding of law in relation to facts, be punished for his failure to recognize subtle factual or legal deficiencies in his allegations." R. 69.
Under his "Points and Authorities" Sanchez cited to the United States and Idaho Constitutions:
1.
... to petition the government for a redress of grievances. U.S. Constitution, Amendment 1.

... .
3.
... nor excessive fines imposed, nor cruel and unusual punishments inflicted. U.S. Constitution, Amendment 8.

4.
... no state shall make or enforce any law which shall abridge the privileges ... of citizens of the United States; nor shall any state deprive any person of ... liberty, or property, without due process of law ... U.S. Constitution, Amendment 14.

5.
Courts of justice shall be open to every person . .. and right and justice shall be administered without sale, denial, delay or prejudice. Idaho Constitution, Art. 1, Section 18.

R. 70.
Finally, in the "Argument" section of his brief, Sanchez wrote:
Petitioner further maintains that he has the right to petition the government for redress of grievances, as afforded by the United States Constitution, as well as being free from excessive fines imposed upon one whom has shown he is unable to afford such "costs and fees."
Therefore, the exercise of those Constitutionally protected rights as also afforded by the Idaho Constitution, Art. 1, Section 18, should not be restricted by threat and/or fear of repercussions, monetary or otherwise.
R. 79. It cannot be argued that the constitutionality issue was not raised by Sanchez below, and his appeal cannot be disposed of on this ground.
The majority opinion is also mistaken in its assertion that issues of constitutionality cannot be raised for the first time on appeal. While ordinarily this Court will not consider issues that were not raised in the trial court, it will address issues raised for the first time on appeal concerning jurisdiction, failure to state a claim upon which relief can be granted, and constitutionality. Nycum v. Triangle Dairy Co., 109 Idaho 858, 862, 712 P.2d 559, 562 (1985); see also Cole v. Fruitland Canning Co., 64 Idaho 505, 510, 134 P.2d 603, 605 (1943) (constitutional question reached though issue was raised for first time on appeal).
Had the majority not devised its serpentine ruse to avoid addressing Sanchez' constitutional challenge, it would have been compelled to recognize the force of the inmate's argument. Sanchez is absolutely correct in asserting that I.C. § 12-122 violates the United States Constitution and that the district court's affirmation of the magistrate's assignment of costs and attorney fees against him must therefore be reversed.
Sanchez brought a habeas corpus action against respondent Arvon Arave, Warden of Idaho State Correctional Institution, and the Idaho Board of Corrections, alleging *1064 inadequate medical care. The magistrate found that Sanchez was receiving adequate medical attention, that there was therefore no basis for relief in habeas corpus, and that the action was brought frivolously as defined by I.C. § 12-122. The writ was quashed and respondent was awarded its costs and attorney fees totalling $581.38. The district court affirmed the magistrate's order.
A long line of United States Supreme Court cases, stretching from 1956 to the present, has enshrined the principle that to interpose any financial consideration between an indigent prison inmate and his or her right to use the courts to obtain his or her freedom violates the due process and equal protection clauses of the fourteenth amendment. Griffin v. Illinois, 351 U.S. 12, 76 S.Ct. 585, 100 L.Ed. 891 (1956) (indigent prison inmates appealing their convictions must be furnished with a transcript and record without cost); Eskridge v. Washington State Bd. of Prison Terms & Paroles, 357 U.S. 214, 78 S.Ct. 1061, 2 L.Ed.2d 1269 (1958) (Washington Supreme Court could not deny indigent defendant's motion for a free transcript); Burns v. Ohio, 360 U.S. 252, 79 S.Ct. 1164, 3 L.Ed.2d 1209 (1959) (Ohio Supreme Court could not prevent an indigent defendant, who was unable to pay docket and filing fees, from filing a motion for leave to appeal to that court); Smith v. Bennett, 365 U.S. 708, 81 S.Ct. 895, 6 L.Ed.2d 39 (1961) (Iowa could not require prison inmates to pay a $4 filing fee as a condition for bringing a habeas corpus action); Coppedge v. United States, 369 U.S. 438, 82 S.Ct. 917, 8 L.Ed.2d 21 (1962) (Court of Appeals could not screen appeals taken in forma pauperis for frivolity where it did not so screen appeals where filing fees were paid); Lane v. Brown, 372 U.S. 477, 83 S.Ct. 768, 9 L.Ed.2d 892 (1963) (prison inmate who was indigent and unable to purchase a transcript could not for this reason be prevented from taking an appeal from denial of a writ of error coram nobis); Draper v. Washington, 372 U.S. 487, 83 S.Ct. 774, 9 L.Ed.2d 899 (1963) (conclusion of a trial judge that an indigent defendant's appeal is frivolous is an inadequate substitute for the full appellate review available to nonindigents); Douglas v. California, 372 U.S. 353, 83 S.Ct. 814, 9 L.Ed.2d 811 (1963) (state must provide indigent defendants with counsel on their appeal as of right); Rinaldi v. Yeager, 384 U.S. 305, 86 S.Ct. 1497, 16 L.Ed.2d 577 (1966) (state could not impose upon indigents who are imprisoned the duty to reimburse the county for the cost of a transcript in case of an unsuccessful appeal and not impose such duty on persons receiving a suspended sentence or a fine); Long v. District Court of Iowa, Lee County, 385 U.S. 192, 87 S.Ct. 362, 17 L.Ed.2d 290 (1966) (state must provide indigent prison inmate with a transcript of the district court hearing of his habeas corpus action for purposes of appealing the denial of the writ); Entsminger v. Iowa, 386 U.S. 748, 87 S.Ct. 1402, 18 L.Ed.2d 501 (1967) (indigent defendant is entitled to the assistance of counsel on her first appeal and appointed counsel must function in the active role of an advocate); Roberts v. LaVallee, 389 U.S. 40, 88 S.Ct. 194, 19 L.Ed.2d 41 (1967) (state must provide indigent defendant with free transcript of preliminary hearing); Gardner v. California, 393 U.S. 367, 89 S.Ct. 580, 21 L.Ed.2d 601 (1969) (indigent prison inmate is entitled to free transcript of habeas corpus proceeding to aid him in preparing a new petition); Ross v. Moffitt, 417 U.S. 600, 94 S.Ct. 2437, 41 L.Ed.2d 341 (1974) (Rule requiring appointment of counsel for indigent state defendants on their first appeal as of right would not be extended to require counsel for discretionary state appeals and for application for review in the Supreme Court. The Griffin, Douglas and Smith v. Bennett line of cases was distinguished but not overturned.); United States v. MacCollom, 426 U.S. 317, 96 S.Ct. 2086, 48 L.Ed.2d 666 (1976) (Where indigent prison inmate chose to forego his opportunity for direct appeal with its attendant unconditional free transcript, government was not required to provide a free transcript of the trial to aid him in preparing a petition for collateral relief. The Griffin, Douglas and Smith v. Bennett line of cases was distinguished but not overturned.); Evitts v. Lucey, 469 U.S. 387, 105 S.Ct. 830, 83 L.Ed.2d 821 (1985) (defendant *1065 is entitled to effective assistance of counsel on first appeal as of right, citing Griffin, Eskridge, Burns, Lane, Draper, Douglas, Ross and Entsminger).
The rationale for the Griffin and Douglas line of cases derives from both the due process and equal protection clauses of the fourteenth amendment. Ross v. Moffitt, 417 U.S. 600, 609, 94 S.Ct. 2437, 2443, 41 L.Ed.2d 341 (1974); Evitts v. Lucey, 469 U.S. 387, 403, 105 S.Ct. 830, 840, 83 L.Ed.2d 821 (1985). The Supreme Court in Ross explained:
"Due Process" emphasizes fairness between the State and the individual dealing with the state, regardless of how other individuals in the same situation may be treated. "Equal protection," on the other hand, emphasizes disparity in treatment by a state between classes of individuals whose situations are arguably indistinguishable.
417 U.S. at 609, 94 S.Ct. at 2443.
In ruling that indigent prison inmates appealing their convictions must be furnished with a transcript and record without cost, the Supreme Court in Griffin v. Illinois declared:
Consequently at all stages of the proceedings the Due Process and Equal Protection Clauses protect persons like the petitioners from invidious discriminations.... There can be no equal justice where the kind of trial a man gets depends on the amount of money he has.
351 U.S. at 18-19, 76 S.Ct. at 590-91 (1956).
Smith v. Bennett, 365 U.S. 708, 81 S.Ct. 895, 6 L.Ed.2d 39 (1961), held that Iowa could not require prison inmates to pay a $4 filing fee as a condition for bringing a habeas corpus action. Summing up its opinion on a resounding note the Court wrote:
Throughout the centuries the Great Writ has been the shield of personal freedom insuring liberty to persons illegally detained. Respecting the State's grant of a right to test their detention, the Fourteenth Amendment weighs the interests of rich and poor criminals in equal scale, and its hand extends as far to each. In failing to extend the privilege of the Great Writ to its indigent prisoners, Iowa denies them equal protection of the laws.
365 U.S. at 714, 81 S.Ct. at 898.
Supreme Court precedent on the equal protection side of the fourteenth amendment equation has attacked not only the rich versus poor classification, but also the prison inmate versus non-inmate classification. Rinaldi v. Yeager, 384 U.S. 305, 86 S.Ct. 1497, 16 L.Ed.2d 577 (1966), held that the state of New Jersey could not impose upon indigents who are imprisoned the duty to reimburse the county for the cost of a transcript in the case of an unsuccessful appeal and not impose such duty on persons receiving a suspended sentence or a fine. The Court concluded:
To fasten a financial burden only upon those unsuccessful appellants who are confined in state institutions, however, is to make an invidious discrimination... . There is no defensible interest served by focusing on that distinction as a classifying feature in a reimbursement statute, since it bears no relationship whatever to the purpose of the repayment provision.
Rinaldi, 384 U.S. at 309, 86 S.Ct. at 1500.
I.C. § 12-122, "Attorney's fees in habeas corpus actions," creates both of the discriminatory classifications proscribed by the Supreme Court in Smith v. Bennett and Rinaldi v. Yeager. The statute violates as well the Due Process Clause as it has been interpreted in the Griffin and Douglas line of cases.
The first paragraph of I.C. § 12-122 provides:
In any habeas corpus action brought by a state penitentiary or county jail inmate, the judge shall award reasonable attorney's fees to the respondent, if, in the judgment of the court, the habeas corpus action was brought frivolously by the petitioner.
The undoubted purpose and resulting effect of the statute is to discourage prison inmates from bringing frivolous habeas actions by hanging over them the specter of getting hit with attorney fees if their writ is poorly conceived or poorly presented.
*1066 The case of Larry Sanchez dramatically demonstrates the devastation wreaked upon an indigent inmate by mandating that costs and attorney fees be assessed against him. Upon the assignment of fees and costs against Sanchez, the prison authorities took it upon themselves to freeze Sanchez' inmate account, which in all probability will result in his not being able to gain access to any funds coming to him until that monetary judgment is retired. In such a manner the legislature, acting upon the behest of whatever agency[1] prodded it into such a devious scheme of precluding jailed or imprisoned inmates from invoking the aid of the Great Writ, undoubtedly has cast a chilling cloud on the filing of habeas corpus petitions, but also may have exposed the State and participating state officials to § 1983 damage actions. Moreover, the statute's chilling effect strikes indigent inmates more profoundly than affluent inmates. There are those who can afford to pay assessed costs and attorney fees, and those who cannot.
In that manner it is readily seen that for the incarcerated indigent the statute erects a tremendous barrier to initiating habeas corpus proceedings. As Smith v. Bennett so succinctly expressed it:
[T]o interpose any financial consideration between an indigent prisoner of the State and his exercise of a state right to sue for his liberty is to deny that prisoner the equal protection of the laws.
365 U.S. at 709, 81 S.Ct. at 896.
Idaho Code § 12-122 also creates the prison inmate versus non-inmate classification proscribed by the Supreme Court in Rinaldi v. Yeager, 384, U.S. 305, 86 S.Ct. 1497, 16 L.Ed.2d 577. The statute applies only to state penitentiary and county jail inmates. They are not the only class of potential habeas corpus petitioners, as is observed on reading I.C. § 19-4201: "Every person unlawfully committed, detained, confined or restrained of his liberty, under any pretense whatever, may prosecute a writ of habeas corpus, to inquire into the cause of such imprisonment or restraint." Mitchell v. Pincock, 99 Idaho 56, 577 P.2d 343 (1978) (child custody proceedings), and Application of Downing, 103 Idaho 689, 652 P.2d 193 (1982) (mental patient), were habeas proceedings. Were those actions filed today, the plaintiffs would not be impaired by the legislature's I.C. § 12-122 provisions. The purpose of I.C. § 12-122 is to discourage frivolous habeas corpus actions, but only as to prison and jail inmates. Thus created is a classification which bears no relationship to the statute's purpose of discouraging frivolous habeas actions, and plainly constitutes an invidious discrimination prohibited by the equal protection clause of the fourteenth amendment. See Rinaldi v. Yeager, 384 U.S. at 309-10, 86 S.Ct. at 1500.
Idaho Code § 12-122 also violates the due process clause as it has been interpreted in the Griffin and Douglas line of cases. The due process clause requires fairness between the State and the individual dealing with the State. Ross v. Moffitt, 417 U.S. at 609, 94 S.Ct. at 2443. The statute's use of monetary sanctions to discourage inmates from exercising their right to bring a habeas corpus action, which is their only defense against violations of their constitutional rights by the state, violates the due process clause's guarantee of fairness. The United States Supreme Court, based on the due process and equal protection analysis first employed in Griffin, has struck down state statutes that have created financial barriers far less debilitating than I.C. § 12-122. See, e.g., Burns v. Ohio, 360 U.S. 252, 79 S.Ct. 1164, 3 L.Ed.2d 1209 ($20 filing fee for review of a criminal appeal by the Ohio Supreme Court); Smith v. Bennett, 365 U.S. 708, 81 S.Ct. 895, 6 L.Ed.2d 39 ($4 filing fee for bringing a habeas corpus action in Iowa).
*1067 Another line of Supreme Court cases has established the principle that "access of prisoners to the courts for the purpose of presenting their complaints may not be denied or obstructed." Johnson v. Avery, 393 U.S. 483, 485, 89 S.Ct. 747, 749, 21 L.Ed.2d 718 (1969); accord Ex parte Hull, 312 U.S. 546, 549, 61 S.Ct. 640, 642, 85 L.Ed. 1034 (1941); Bounds v. Smith, 430 U.S. 817, 821, 97 S.Ct. 1491, 1494, 52 L.Ed.2d 72 (1977); Turner v. Safley, 482 U.S. 78, 84-85, 107 S.Ct. 2254, 2259, 96 L.Ed.2d 64 (1987). In Bounds v. Smith the Supreme Court wrote as to circumstances similar to these:
It is now established beyond doubt that prisoners have a constitutional right of access to the courts. This Court recognized that right more than 35 years ago when it struck down a regulation prohibiting state prisoners from filing petitions for habeas corpus unless they were found `properly drawn' by the `legal investigator' for the parole board. Ex parte Hull, 312 U.S. 546, 61 S.Ct. 640, 85 L.Ed. 1034 (1941). We held this violated the principle that `the state and its officers may not abridge or impair petitioner's right to apply to a federal court for a writ of habeas corpus.' Id. at 549, 61 S.Ct. at 641. See also Cochran v. Kansas, 316 U.S. 255, 62 S.Ct. 1068, 86 L.Ed. 1453 (1942).
More recent decisions have struck down restrictions and required remedial measures to insure that inmate access to the courts is adequate, effective, and meaningful. Thus in order to prevent `effectively foreclosed access,' indigent prisoners must be allowed to file appeals and habeas corpus petitions without payment of docket fees. Burns v. Ohio, 360 U.S. 252, 257, 79 S.Ct. 1164, 1168, 3 L.Ed.2d 1209 (1959); Smith v. Bennett, 365 U.S. 708, 81 S.Ct. 895, 6 L.Ed.2d 39 (1961).[2]
Bounds v. Smith, 430 U.S. 817, 821, 97 S.Ct. 1491, 1494, 52 L.Ed.2d 72 (1977).
Idaho Code § 12-122 flies in the face of the principle of access to the courts. The purpose of the statute is to cut down on the number of habeas actions by threatening prison inmates with stiff penalties if their novice legal skills do not get them over the "frivolous" hurdle. Since most inmates are not attorneys, or for that matter possess little legal or any other education at all, the sanctions contained in Idaho Code § 12-122 will effectively deter inmates from trying their hand at defending their rights in the legal arena. Idaho Code § 12-122 therefore violates prison inmates' constitutional right of access to the courts.
Idaho Code § 12-122 is facially unconstitutional and equally unconstitutional as applied. The decisions of the magistrate and district courts should therefore be reversed, and today's opinion for the Court withdrawn so that this Court's credibility not be further diminished. Although the Supreme Court of the United States of recent weeks appears to have lessened its activities rather considerably, as compared to that Court's illustrious record in protecting constitutional rights, it is much feared that it may feel compelled to become involved in the controversy where the magnitude of this Court's error in ignoring precedent and allowing legislative encroachment on a constitutional right is so readily apparent.
NOTES
[1]  The solicitor general may be the one, which is surmise based on known history that by his own admission he stampeded the Idaho legislature into depriving capital criminal defendants of their prior existing right to have the extent of their punishment declared by a jury of their peers, concerning which former Justice Huntley and I have written and written, all to no avail insofar as a captive legislature for reasons known only to it has yet to intervene or investigate.
[2]  While Ex parte Hull and Johnson v. Avery dealt with federal habeas corpus petitions, Smith v. Bennett, which was cited in Bounds v. Smith, involved state habeas corpus petitions. The principle that prison inmates have a right of access to the courts that may not be obstructed has been recognized by the Supreme Court as to both federal and state habeas corpus actions. The Court in Smith v. Bennett wrote: "[T]here is no higher duty than to maintain [the writ of habeas corpus] unimpaired, ... and unsuspended, save only in the cases specified in our Constitution. When an equivalent right is granted by a State, financial hurdles must not be permitted to condition its exercise." 365 U.S. at 713, 81 S.Ct. at 898.
