
714 S.E.2d 385 (2011)
310 Ga. App. 799
HILL
v.
CLARKE.
No. A11A0369.
Court of Appeals of Georgia.
July 13, 2011.
*386 John R. Monroe, for appellant.
Jennifer Brooke Savage, Karen Gilpin Thomas, Lawrenceville, Michael V. Stephens II, for appellee.
MILLER, Presiding Judge.
Clifford Hill brought this action in mandamus against Walter Clarke, in his official capacity as Judge of the Probate Court of Gwinnett County ("Judge Clarke") upon Judge Clarke's denial of his application for a Georgia firearms license ("GFL"). After prevailing in the mandamus action, Hill filed a request for attorney fees pursuant to OCGA § 16-11-129(j). The superior court denied Hill's motion, finding that "relative equities would be best served" if each party was solely responsible for his own fees. Hill appeals, contending that the superior court's failure to award attorney fees was in contravention of the statute. Because the superior court based its decision on an erroneous legal theory, we must reverse.
"When a question of law is at issue, as here, we owe no deference to the trial court's ruling and apply the `plain legal error' standard of review. [Cit.]" Suarez v. Halbert, 246 Ga.App. 822, 824(1), 543 S.E.2d 733 (2000).
The record shows that Hill applied to Judge Clarke for a GFL pursuant to OCGA § 16-11-129 on May 19, 2009. Based upon a statutory interpretation of OCGA § 16-11-129(b)(3) and (b)(5)(A), as in effect at that time,[1] Judge Clarke denied the application. In doing so, Judge Clarke determined that Hill was ineligible for a GFL due to his record of prior drug convictions. The record showed that Hill had entered a first offender plea to a drug charge in 1974 and had been convicted of subsequent drug charges in 1977 and 1978. On June 29, 2009, Hill moved for reconsideration of such ruling based upon an unconditional pardon issued to him in 1988 by the State Board of Pardons and Paroles, which among other things, included the restoration of the right to bear arms. Judge Clarke denied Hill's motion for reconsideration.
Hill thereafter filed a complaint in mandamus in the superior court. On cross-motions for summary judgment, the superior court *387 granted summary judgment to Hill, directing that he be issued a GFL and that he "file appropriate documentation of his costs and attorney[] fees within 21 days[.]" Thereafter, Hill timely filed a request for attorney fees in the amount of $14,588. Without determining whether the amount of fees requested was reasonable or unreasonable, the superior court denied the request, finding that the equities would best be served if each party was to bear his own expenses incident to the litigation.
Hill's claim for attorney fees was based upon OCGA § 16-11-129(j), which provides:
When an eligible applicant who is a United States citizen[2] fails to receive a license, temporary permit, or renewal license within the time period required by this Code section and the application or request has been properly filed, the applicant may bring an action in mandamus or other legal proceeding in order to obtain a license, temporary license, or renewal license. If such applicant is the prevailing party, he or she shall be entitled to recover his or her costs in such action, including reasonable attorney's fees.

(Emphasis supplied.) Given the text of OCGA § 16-11-129(j), we conclude that the trial court erroneously grounded its order in equity, not in law. See Springs Condo. Assn. v. Harris, 297 Ga.App. 507, 508, 677 S.E.2d 715 (2009) ("Where a statute's language as to an award of attorney fees is mandatory, the trial court is required to award attorney fees.") (footnote omitted); Kroger Co. v. U.S. Foodservice of Atlanta, 270 Ga.App. 525, 530(3), 607 S.E.2d, 177 (2004) (the award of statutory attorney fees presents a question in law and "[w]hen the statutory requisites are met, the trial court's discretion to deny the award is eliminated"). Because it is clear that the claim for statutory attorney fees was denied on an erroneous legal theory, reversal is required and the case must be remanded to the trial court for proper consideration of the claim. See Imerys Clays, Inc. v. Washington County Bd. of Tax Assessors, 287 Ga.App. 674, 676, 652 S.E.2d 580 (2007) ("[A]n appellate court cannot affirm a judgment based on an erroneous legal theory.") (citations and punctuation omitted).
We nevertheless question whether the statutory attorney fees provision may be applied in the context of this case in light of the doctrine of judicial immunity.[3] However, because the parties do not present arguments on that basis and that issue was not raised and ruled upon in the proceedings below, we shall not address it for the first time on appeal. See Lowery v. Atlanta Heart Assocs., 266 Ga.App. 402, 404(2), 597 S.E.2d 494 (2004); Batesville Casket Co. v. Watkins Mortuary, 293 Ga.App. 854, 855(1), 668 S.E.2d 476 (2008) (Generally, "[w]e are limited to considering only those grounds raised and ruled on below by the trial court and may not consider a basis for appeal not presented at the trial level.") (citation and punctuation omitted).
Given the foregoing, we reverse the judgment of the trial court and remand with direction that the trial court consider the *388 attorney fees issue in accordance with the proper standard and consider the issue of judicial immunity in its efforts to resolve this matter.
Judgment reversed and case remanded with direction.
ELLINGTON, C.J., and DOYLE, J., concur in the judgment only.
NOTES
[1]  Pertinently, subsection (b)(5)(A) of OCGA § 16-11-129 (2009) stated that no GFL shall be issued to a person convicted of a drug offense notwithstanding subsection (b)(3) of such statute, which barred the issuance of a GFL to persons convicted of a felony unless pardoned. OCGA § 16-11-129(b)(3), (5)(A) (2009). OCGA § 16-11-129 was amended, effective June 4, 2010, but the amendment does not apply in this case.
[2]  We note that the 2010 amendment of this Code section deleted the requirement for status as a United States citizen. OCGA § 16-11-129(j) (2010).
[3]  We note that "[j]udicial officers have been shielded from civil actions for acts done in their judicial character from the earliest dawn of jurisprudence down to the latest reported cases." (Citations and punctuation omitted.) West End Warehouses v. Dunlap, 141 Ga.App. 333, 233 S.E.2d 284 (1977). See also Earl v. Mills, 275 Ga. 503, 504(1), 570 S.E.2d 282 (2002) (affirming the dismissal of the portion of a complaint for damages against a judge since judicial immunity applied).

[T]his immunity applies even when the judge is accused of acting maliciously and corruptly, and it is not for the protection or benefit of a malicious or corrupt judge, but for the benefit of the public, whose interest it is that the judges should be at liberty to exercise their functions with independence and without fear of consequences.
(Citation and punctuation omitted.) Smith v. Hancock, 150 Ga.App. 80, 81, 256 S.E.2d 627 (1979). Judicial immunity is foreclosed in only two circumstances. "First, a judge is not immune from liability for nonjudicial actions, i.e., actions not taken in the judge's judicial capacity. Second, a judge is not immune for actions, though judicial in nature, taken in the complete absence of all jurisdiction." (Citations omitted.) Mireles v. Waco, 502 U.S. 9, 11-12, 112 S.Ct. 286, 116 L.Ed.2d 9 (1991).
