
90 P.3d 340 (2004)
140 Idaho 115
G. David REARDON, a married man, Plaintiff, and
MAGIC VALLEY SAND AND GRAVEL, INC., Plaintiff-Appellant,
v.
City of Burley, a municipal corporation and the County of Cassia, Defendants-Respondents.
No. 29120.
Supreme Court of Idaho, Twin Falls, November 2003 Term.
April 29, 2004.
Rehearing Denied April 29, 2004.
*341 Marcus, Merrick, Christian & Hardee, L.L.P., Boise, for appellant. Michael R. Christian argued.
Parsons, Smith & Stone, Burley, for respondent, City of Burley. Randolph C. Stone argued.
Alfred E. Barrus, Cassia County Prosecutor, Burley, for respondent, County of Cassia. Did not participate in the appeal.

SUBSTITUTE OPINION
KIDWELL, Justice.
This is an appeal by Magic Valley Sand and Gravel, Inc. (Magic Valley) from an order of the district court denying a claim for attorney fees pursuant to Idaho Code § 12-117 against the City of Burley (City) and Cassia County (County). Magic Valley argues they are entitled to attorney fees pursuant to Idaho Code § 12-117. Because the County acted without a reasonable basis in fact or law, the Order of the district court is vacated and remanded.

I.

FACTUAL AND PROCEDURAL BACKGROUND
Magic Valley owns three parcels of land (parcels A, B, & C) that are located in Cassia County. Since 1984, Magic Valley has conducted sand and gravel operations on parcel A and B. Other gravel pits have been operating near the vicinity of the Magic Valley properties since the early 1960's.
On November 2, 1998, the City enacted Zoning Ordinance No. 1112. This ordinance extended the City's Area of Impact (i.e., the area the city's ordinances will affect) to include all three Magic Valley parcels. It also applied the City's Zoning Ordinance to the Area of Impact.
On November 16, 1998, the County adopted ordinance No. 98-11-1. Ordinance No. 98-11-1 stated that Ordinance No. 1112 and the City's Zoning Map applied to the City's Area of Impact. These ordinances were adopted pursuant to I.C. § 67-6526. The ordinances did not state which, if any, of the City's zoning classifications applied to the Area of Impact. However, Ordinance Nos. 1112 and 98-11-1 did provide for the City to act on all applications regarding property within the Area of Impact. Both the City and County mutually agreed upon the Area of Impact and upon a Plan and Ordinance to that area.
On March 17, 1999, the City adopted ordinance No. 1123. This ordinance imposed the City's residential R-1 zone on Parcels A, B, and C for 120 days. The zone change was classified as "an emergency zoning based upon a finding of imminent peril to public health and welfare." The City followed up with "findings" and adoption of Ordinance No. 1129 on September 7, 1999. When read together, Ordinance No. 1129 and the "findings" expressed the City's intent to incorporate parcels A, B, and C within the City's R-1 zone until "permanent zoning is enacted or September 1, 2000, whichever comes first." The ordinance selectively imposed the R-1 zone on all three Magic Valley parcels without purporting to affect the use of other adjoining property.
On May 31, 2000, Magic Valley applied for a County Special Use Permit to mine sand and gravel on Parcel C. Parcel C is located in unincorporated Cassia County but within the City's Area of Impact. The County returned the application on August 2, 2000, unprocessed, *342 because Parcel C was located within the City's Impact Zone. The County told Magic Valley it needed to apply through the City for this permit. Magic Valley subsequently submitted an application to the City. The City refused to accept the application because the City had zoned parcel C for residential use.
On February 8, 2001, Magic Valley sued to have City and County Ordinance Nos. 1112, 1123, 1129, 1152, City Resolution No. 3-01, and County Ordinance No. 98-11-1 overturned. Magic Valley argued the ordinances violated Article XII, § 2 of the Idaho Constitution and the Local Land Use Planning Act (LLUPA), I.C. § 67-6526(d) and (e). Magic Valley moved for, and was granted, Summary Judgment.
By Memorandum Opinion dated October 16, 2001, the district court voided City Ordinance Nos. 1112, 1123, 1129, 1152, City Resolution No. 3-01, and County Ordinance No. 98-11-1, and directed the County to process Magic Valley's gravel application for a special use permit pursuant to the County zoning ordinance in effect at the time the application was originally filed in May 2000. Ordinance Nos. 1112, 1123, 1129, 1152, City Resolution No. 3-01, and County Ordinance No. 98-11-1 were voided because they allowed the City to take over the present and future zoning of the Area of Impact without timely, parallel action by the County.
The City moved the district court for reconsideration of its opinion. The City argued the district court failed to address or take into account Cassia County Ordinance No.2001-801. The district court granted the City's motion to reconsider and on December 18, 2001, the district court modified its October 16, 2001, opinion.
The district court concluded County Ordinance No.2001-801 "ratified" the City zoning ordinances when it was passed in August 2001. However, the ratification did not apply to Magic Valley. The district court inferred a timely ratification requirement in Ordinance Nos. 98-11-1 and 1112. The passage of County Ordinance No.2001-801 satisfied this requirement. The district court considered voiding the ordinances as too harsh for the City and County because they would require the City and County to unnecessarily go through the burdensome zoning process a second time.
Ordinance No.2001-801 applied prospectively to the City and County and complied with the applicable statutes and constitutional provisions. The district court, again, directed the County to process Magic Valley's application for a special use permit by applying County zoning ordinances that were in place at the time of the application. Additionally, the district court directed Magic Valley's counsel to prepare a Judgment consistent with the October 16, 2001, ruling as modified by the December 18, 2001, ruling.
Magic Valley's counsel drafted the Judgment and the district court signed it on April 24, 2002. The Judgment stated, inter alia:
As a matter of law, [Ordinance Nos. 1112, 1123, 1129, and 1152, City Resolution No. 3-01, and County Ordinance No. 98-11-1] violated Article XII, § 2 of the Idaho Constitution and the Local Land Use Planning Act, Idaho Code § 67-6526(d) and (e) and lacked any reasonable factual or legal basis at the time they were enacted, because they purported to allow the City to unilaterally impose its power on land outside the City's sovereign limits without timely parallel action by the County, and such Ordinances and Resolution are hereby declared unenforceable as against [Magic Valley's] property.
The Judgment also specified Magic Valley would submit a memorandum of costs pursuant to I.R.C.P. 54. The City appealed the judgment, but later withdrew the appeal. The County did not appeal the Judgment.
After entry of the Judgment, Magic Valley moved for an award of attorney fees pursuant to I.C. § 12-117. Magic Valley argued they were entitled to attorney fees because they met the requirements of I.C. § 12-117; specifically, because the district court ruled in Magic Valley's favor and because the Judgment stated the City and County acted without a reasonable basis in fact or law. The City objected to the language of the Judgment and moved the district court for relief and a disallowance of costs.
*343 On July 26, 2002, the district court entered an Opinion granting the City relief from the Judgment. The district court concluded the Judgment, as drafted by Magic Valley, misstated the findings of the district court. To clarify its earlier conclusions the district court stated,
while this [c]ourt believes the actions of the City and County were wrong and against the case and statutory law, this [c]ourt made no express or implied finding that the [City or County] acted without a reasonable basis in fact or law. Nor does this [c]ourt make such a finding now. The Judgment goes beyond any finding made by this [c]ourt and was signed in error.
The district court then denied Magic Valley's request for costs and attorney fees pursuant to I.C. § 12-117.
On August 28, 2002, the district court entered a Supplemental Opinion. The Supplemental Opinion resolved the issue of whether the City and County acted without a reasonable basis in fact or law, and whether Magic Valley was entitled to attorney fees pursuant to I.C. § 12-117. Although the district court ruled in favor of Magic Valley, it did not find the actions of the City and County lacked a reasonable basis in fact or law. The district court found the County's agreement to adopt the City's plan, ordinances, and future amendments for the City's Area of Impact, while reserving for itself the power and the right to renegotiate at any time it disagreed with the City's actions, reasonable. The district court stated, "[t]he law on this point is not clear, and is subject to differing interpretations. No case was found directly on all fours." Based on this reasoning, the district court denied Magic Valley attorney fees pursuant to I.C. § 12-117. Magic Valley appeals to this Court.

II.

STANDARD OF REVIEW
This Court freely, or de novo, reviews a district court's decision regarding attorney fees under I.C. § 12-117. Farrell v. Bd. of Comm'rs, Lemhi County, 138 Idaho 378, 383, 64 P.3d 304, 309 (2002); Rogers v. Gooding Pub. Joint Sch. Dist. No. 231, 135 Idaho 480, 483-5, 20 P.3d 16, 19-21 (2001); Stacey v. Dept. of Labor, 134 Idaho 727, 731, 9 P.3d 530, 534 (2000); Urrutia v. Blaine County, 134 Idaho 353, 361, 2 P.3d 738, 746 (2000); State, Dept. of Fin. v. Res. Serv. Co., Inc., 134 Idaho 282, 283, 1 P.3d 783, 784 (2000); Payette River Prop. Owners Ass'n v. Bd. of Commr's of Valley County, 132 Idaho 551, 557, 976 P.2d 477, 484 (1999); Rincover v. State, Dept. of Fin., Sec. Bureau, 132 Idaho 547, 548-49, 976 P.2d 473, 474-76 (1999).

III.

ANALYSIS
A. Magic Valley Is Entitled To Attorney Fees Pursuant To I.C. § 12-117.
Magic Valley seeks an award of attorney fees pursuant to Idaho Code § 12-117. Idaho Code, § 12-117 provides:
In any administrative or civil judicial proceeding involving as adverse parties a state agency, a city, a county or other taxing district and a person, the court shall award the person reasonable attorney's fees, witness fees and reasonable expenses, if the court finds in favor of the person and also finds that the state agency, the city, the county or the taxing district acted without a reasonable basis in fact or law.
The purpose of I.C. § 12-117 is two-fold: First, it serves "as a deterrent to groundless or arbitrary agency action; and [second, it provides] a remedy for persons who have borne unfair and unjustified financial burdens defending against groundless charges or attempting to correct mistakes agencies never should have made." Rincover, 132 Idaho at 549, 976 P.2d at 475 (quoting Bogner v. State Dep't of Revenue and Taxation, 107 Idaho 854, 859, 693 P.2d 1056, 1061(1984)). An award of attorney fees under I.C. § 12-117 has been distilled into a two-part test. Attorney fees must be awarded if (1) the Court finds in favor of the person, and (2) the City or County acted without a reasonable basis in fact or law. I.C. § 12-117.
*344 1. Magic Valley Is The Prevailing Party.
A prevailing party is one the court finds for in a case. I.C. § 12-117. Magic Valley argues it is the prevailing party because the City's unilateral enactment of Ordinance Nos. 1112, 1123, 1129, 1152, and City Resolution 3-01, and the County's enactment of Ordinance No. 98-11-1, which granted the City power to enact Ordinances and Resolutions without parallel County action, violates Article XII, § 2 of the Idaho Constitution and the LLUPA, I.C. § 67-6526(d). This Court agrees with Magic Valley.
In Idaho, any county or incorporated city or town may make and enforce, within its limits, all such local police, sanitary and other regulations as are not in conflict with its charter or with the general laws. Idaho Const. art. XII, § 2. A city's exercise of jurisdiction in an impact area lying beyond a city's limits is inconsistent with the constitutional limitations placed on a city's powers by Article XII, § 2 of the Idaho Constitution. Blaha v. Bd. of Ada County Comm'ns, 134 Idaho 770, 777, 9 P.3d 1236, 1243; see also, Boise City v. Blaser, 98 Idaho 789, 791, 572 P.2d 892, 894 (1977).
City Ordinance No. 1112 allows the City to unilaterally enact and apply, without parallel County approval, as is required under I.C. § 67-6526(d), its comprehensive plan, subdivision ordinances, and zoning ordinances to the City's Area of Impact within the unincorporated area of the County. Because City Ordinance No. 1112 is not confined to the constitutional limits of Article XII, § 2 of the Idaho Constitution and because it conflicts with the requirements of I.C. § 67-6526(d), it is void. Additionally, the City's enactment of the subsequent Ordinance Nos. 1123, 1129, 1152, and City Resolution No. 3-01 are also void for the same reasons.
County Ordinance No. 98-11-1 presents a different situation. A county, by ordinance, can adopt the terms of a city's ordinance. I.C. § 67-6526(a)(1); see also Idaho Op. Atty. Gen. No. 95-1, 129-31 (1995). However, the LLUPA "establishes explicit and express procedures to be followed by the governing boards or commissions when considering, enacting and amending zoning plans and ordinances." Gumprecht v. City of Coeur d'Alene, 104 Idaho 615, 617, 661 P.2d 1214,1216 (1983). Specifically, under I.C. § 67-6526(d) "areas of city impact, plan, and ordinance requirements shall remain fixed until both governing boards agree to renegotiate." I.C. § 67-6526(d).
In this case, County Ordinance No. 98-11-1 adopted the terms of City Ordinance No. 1112 while reserving to the County the right to renegotiate only the Area of City Impact. The County's adoption of City Ordinance No. 1112 allowed the City to unilaterally enact, apply, and control, without renegotiation with the County, changes to the City's comprehensive plan, subdivision ordinances, zoning ordinances, and land use applications within the unincorporated area of the County, but within the City's Area of Impact. By its terms, County Ordinance No. 98-11-1 does not follow the explicit, express procedures of I.C. § 67-6526(d) because it authorizes the City to unilaterally act without parallel County action. As such, it is void because it violates the terms of I.C. § 67-6526(d) and the separate sovereignty provisions of Article XII, § 2 of the Idaho Constitution, as well as the careful avoidance of any county/city jurisdictional conflict or overlap which is safeguarded therein. Boise City v. Blaser, 98 Idaho 789, 791, 572 P.2d 892, 894 (1977) (citing Clyde Hess Distrib. Co. v. Bonneville County, 69 Idaho 505, 210 P.2d 798 (1949)).
Therefore, this Court finds Magic Valley is the prevailing party because City and County Ordinance Nos. 1112, 1123, 1129, 1152, 98-11-1, and City Resolution No. 3-01 violate Article XII, § 2 of the Idaho Constitution and the LLUPA, I.C. § 67-6526(d).
2. The City And County Acted Without A Reasonable Basis In Fact Or Law When They Enacted City Ordinance Nos. 1112, 1123, 1129, 1152, City Resolution No. 3-01, and County Ordinance No. 98-11-1.
The prevailing party is entitled to attorney fees under I.C. § 12-117 if they show the state agency "acted without a reasonable basis in fact or law." I.C. § 12-117. Magic Valley argues the City and County did not *345 have a reasonable basis in fact or law when they enacted City Ordinance Nos. 1112, 1123, 1129, 1152, City Resolution 3-01, and County Ordinance No. 98-11-1.
Where an agency has no authority to take a particular action, it acts without a reasonable basis in fact or law. Moosman v. Idaho Horse Racing Comm'n, 117 Idaho 949, 954, 793 P.2d 181, 186. This Court recognized as far back as 1949 that a city's exercise of jurisdiction in an impact area lying beyond a city's limits is inconsistent with the constitutional limitations placed on a city's powers by Article XII, § 2 of the Idaho Constitution. Blaha, 134 Idaho at 777, 9 P.3d at 1243 (citing Hobbs v. Abrams, 104 Idaho 205, 657 P.2d 1073 (1983); Boise City v. Blaser, 98 Idaho 789, 791, 572 P.2d 892, 894 (1977); Clyde Hess Distrib. Co. v. Bonneville County, 69 Idaho 505, 210 P.2d 798 (1949)).
City Ordinance No. 1112 grants the City the authority to unilaterally enact, apply, and control, without renegotiation with the County, changes to the City's comprehensive plan, subdivision ordinances, zoning ordinances, and land use applications within the unincorporated area of the County, but within the City's Area of Impact. The power granted to the City by Ordinance No. 1112 constitutes an exercise of jurisdiction in an impact area lying beyond the city's limits and is inconsistent with the constitutional limitations placed on a city's powers by Article XII, § 2, of the Idaho Constitution. As per Court precedent on this issue, reaching as far back as 1949, the City did not have the authority to enact Ordinance No. 1112. However, this Court finds that the City, by enacting the subsequent Ordinance Nos. 1123, 1129, 1152, and City Resolution No. 3-01, was making a reasonable attempt to act and interpret the LLUPA. This Court concludes that the City was not acting without a reasonable basis in fact or law.
County Ordinance No. 98-11-1 runs afoul of the terms of the LLUPA. Under I.C. § 67-6526(d) of the LLUPA, "[a]reas of city impact, plan, and ordinance requirements shall remain fixed until both governing boards agree to renegotiate." I.C. § 67-6526(d). The terms of LLUPA "establishes explicit and express procedures to be followed by the governing boards or commissions when considering, enacting and amending zoning plans and ordinances." Gumprecht, 104 Idaho at 617, 661 P.2d at 1216.
County Ordinance No. 98-11-1 adopted City Ordinance No. 1112 and allowed the City to unilaterally act when making changes to the City's comprehensive plan, subdivision ordinances, zoning ordinances, and land use applications within the unincorporated area of the County. County Ordinance 98-11-1 violates the explicit and express procedures required of governing boards when enacting and amending zoning plans and ordinances because it allows the City to make changes without parallel County action. The County, pursuant to I.C. § 67-6526(d), was obligated to review the City's zoning ordinances and either adopt them as their own or renegotiate. In short, the County's power over the area of impact required County involvement. Therefore, the County did not have a reasonable basis in fact or law when it enacted County Ordinance No. 98-11-1. Moosman, 117 Idaho at 954, 793 P.2d at 186.
In conclusion, Magic Valley is entitled to attorney fees pursuant to I.C. § 12-117 because the two-part requirement of I.C. § 12-117 is met. Magic Valley is the prevailing party and the County did not have a reasonable basis in fact or law when it enacted Ordinance No. 98-11-1. Thus, the County is responsible for attorney fees.

B. Attorney Fees On Appeal.
Magic Valley seeks attorney fees on appeal pursuant to Idaho Code § 12-117. Idaho Code § 12-117 authorizes the awarding of attorney fees on appeal. Daw ex rel. Daw v. School Dist. 91 Bd. of Trs., 136 Idaho 806, 808, 41 P.3d 234, 236 (2001) (citing Rural Kootenai Org., Inc. v. Bd. of Comm'rs, 133 Idaho 833, 993 P.2d 596 (2000)). The two-part test of I.C. § 12 117 applies on appeal. Daw, 136 Idaho at 808, 41 P.3d at 236.
Magic Valley is the prevailing party in this appeal. Moreover, the County did not act with a reasonable basis in fact or law when it enacted the aforementioned ordinance because *346 it violated the terms of the Idaho Constitution and the LLUPA. Therefore, Magic Valley is awarded attorney fees on appeal.

IV.

CONCLUSION
Because Magic Valley is the prevailing party and because the County did not act with a reasonable basis in fact or law, the district court order denying Magic Valley's request for attorney fees pursuant to I.C. § 12-117 is vacated and remanded for a hearing to determine the amount of attorney fees Magic Valley is to be awarded from the County. Magic Valley's request for attorney fees on appeal, pursuant to I.C. § 12-117, is granted. Costs to Magic Valley on appeal.
Chief Justice TROUT and Justices SCHROEDER, EISMANN, and BURDICK concur.
