
146 Wis.2d 271 (1988)
430 N.W.2d 374
RICHLAND COUNTY, a municipal corporation of the State of Wisconsin, Petitioner-Respondent,
v.
State DEPARTMENT OF HEALTH & SOCIAL SERVICES, Respondent, Becky HARRIS, Appellant.
No. 87-1391.
Court of Appeals of Wisconsin.
Submitted on briefs April 22, 1988.
Decided August 25, 1988.
*272 For the appellant the cause was submitted on the briefs of Mitchell M. Hagopian and Western Wisconsin Legal Services of Dodgeville.
For the petitioner-respondent the cause was submitted on the brief of Benjamin Southwick, corporation counsel, of Richland Center.
Before Gartzke, P.J., Eich and Sundby, JJ.
SUNDBY, J.
Becky Harris appeals an order dismissing her motion against Richland County for costs and reasonable attorney fees. She claims that the county's petition under sec. 227.53, Stats.,[1] was frivolous because the county lacked standing to challenge the decision of the state department of health and social services (DHSS) and because the county or its attorney knew or should have known that its petition for review was without any reasonable basis in law or equity and could not be supported by a good faith argument for an extension, modification or reversal of existing law. We conclude that the county had standing to petition to review the department's *273 decision but that the petition was frivolous under sec. 814.025(3)(b), Stats.[2] We therefore reverse the order and remand the case to the trial court to determine Harris's costs and fees thereunder. The award shall include costs and fees on this appeal.

I.
Becky Harris, her husband, Dennis Harris, and their children moved to Richland County in 1984 and began receiving AFDC-Unemployed Parent Benefits. From February 1985 to July 1985 Dennis was imprisoned in the Richland County Jail. During that time the county department of social services changed its records to reflect that the deprivation factor which determined AFDC eligibility was "absent parent," rather than "unemployed parent." When Dennis was released, the Harrises requested that the county department add his needs back into the family grant. The county department, however, took the position that Dennis would have to be treated as an applicant rather than a recipient, and meet the work history requirement. Because he could not, the county department determined that the family was not eligible for benefits and proposed to discontinue their eligibility effective August 1, 1985.
*274 Upon review under sec. 49.50(8), Stats., the DHSS determined that the county department's interpretation was incorrect and that at all times "unemployed parent" should have been the appropriate deprivation factor. It remanded the matter to the county department with instructions to continue AFDC-Unemployed Parent Benefits to the Harris family. The department denied the county's petition for rehearing. The county then petitioned the circuit court under sec. 227.53, Stats., to review the department's decision. When the department assured the county in its brief in support of its motion to dismiss that the department would make no "financial disallowances," the county dismissed its petition for review.

II.
Harris contends that the county's petition was frivolous because the county lacked standing to sue the DHSS. The county did not "sue" the state when it petitioned for review of the decision of the DHSS. A petition for review under sec. 227.53, Stats., does not initiate an action but a special proceeding. In petitioning for review of the DHSS's decision, the county was not transgressing the fundamental prohibition against questioning the wisdom of the state, but was contending that the department was acting beyond the scope of its delegated authority. It had standing to do so. See Brown County v. H&SS Department, 103 Wis., 2d 37, 44-45, 307 N.W.2d 247, 251 (1981). Rulings of a state agency have been challenged by municipalities by petitions for review under ch. 227. See Norway v. State Board of Health, 32 Wis. 2d 362, 145 N.W.2d 790 (1966) (town had standing to petition for judicial review under ch. 227, Stats., of state board's order); *275 Kegonsa Jt. Sanit. Dist. v. City of Stoughton, 87 Wis. 2d 131, 148, 274, N.W.2d 598, 606 (1979) (ch. 227 review exclusive remedy available to Kegonsa as to its claims against the department of natural resources).
[1]
We therefore reject Harris's claim that the county lacked standing to petition for review of the decision of the DHSS.

III.

A.
The trial court assumed that Harris's motion for costs and attorney fees was made pursuant to secs. 227.485 and 814.245, Stats., Wisconsin's Equal Access to Justice Act. It determined that Harris was not entitled to "frivolous costs," but its ruling was in the context of the EAJA and not sec. 814.025. Thus, the trial court did not rule on the question of whether it was required to assess costs and fees against the county under sec. 814.025. Whether the county and its counsel knew or should have known that its petition had no reasonable basis in law or equity and could not be supported by a good faith argument for an extension, modification or reversal of existing law is a question of law which we may resolve on the basis of the affidavits and the record. Wengerd v. Rinehart, 114 Wis. 2d 575, 583, 338 N.W.2d 861, 866 (Ct. App. 1983). We conclude that the affidavits and record are sufficient for us to decide this question of law.

B.
The county states its basis for seeking ch. 227, Stats., review of the DHSS's decision as follows: *276 "County decided to seek judicial review by starting this action, as a means of securing more solid assurance that a fiscal disallowance would not occur if County paid AFDC benefits to Harris in conformity with the hearing examiner's decision."
Harris argues that the county's fear of a "fiscal disallowance" was unreasonable. She also contends that the county failed to adequately investigate the law and facts prior to seeking ch. 227, Stats., review. She asserts that the judicial system has been abused by the county's "unreasonable demand for judicial intervention."
The county contends that it had a very strong basis in law for its decision to change the Harris family's AFDC deprivation factor from unemployed parent to absent parent. It cites sec. 49.19(4)(d)2, Stats., Wis. Adm. Code sec. HSS 201.14, the DHSS's AFDC Handbook, and the advice of the DHSS's "wizard."
We agree that prior to the decision of the DHSS, the county department had a legitimate concern as to how it should treat the Harris family in view of Dennis's imprisonment. After the DHSS mandate that the county pay AFDC-U benefits to the Harrises, however, the county department was no longer justified in treating Dennis as an applicant and, on that basis, denying eligibility to the Harris family. The county would have suffered no injury if it had simply followed the directive of the DHSS. The county was acting as the agent of the state in administering a program funded entirely by state and federal money. Moreover, as required by sec. 49.52, Stats., the state reimbursed the county for its costs of administering the AFDC program.
*277 In opposition to Harris's motion for costs, the director of the county department averred that, "It was the probability of a fiscal disallowance by the State, even in view of the administrative Hearing Officer's Decision, that gave rise to affiant's decision to commence the above-entitled action [the petition for review]."
The director does not deny, however, that after the hearing examiner's decision, he did not contact the DHSS to determine if it intended to make a fiscal disallowance if the county paid AFDC-U aid to the Harrises. The county does not deny that its legal advisor did not seek an opinion from the DHSS as to the possibility of a fiscal disallowance.
The DHSS's brief in support of it's motion to dismiss points up succinctly the frailty of the county's position:
It would be truly incongruous and indefensible if the department were to refuse ... reimbursement either for the grant or for administrative costs when the county agency was mandated by the Department's own orders to reinstate the Harrises.
Such a position would not only have been ethically indefensible, it would have been legally indefensible. State agencies are not immune from equitable estoppel. State v. City of Green Bay, 96 Wis. 2d 195, 201-202, 291 N.W.2d 508, 511 (1980).
[2]
We conclude, therefore, that the county's continued challenge to the Harrises' eligibility had no reasonable basis in law or equity and its use of ch. 227, Stats., review to continue that challenge was frivolous.


*278 IV.
[3]
Harris claims that she is entitled to costs and attorney fees on this appeal. We agree. The trial court was required to award her costs and reasonable attorney fees. To enforce her right she was forced to appeal. We conclude that the purpose of sec. 814.025, Stats., would be substantially compromised if victims of a frivolous claim or defense were compelled to litigate at their own expense their entitlement to costs and fees.
Allowing appeal costs and fees to the successful party to whom costs and attorney fees have been awarded under sec. 814.025, Stats., is consistent with the approach approved in In Matter of Estate of Trotalli, 123 Wis. 2d 340, 363-64, 366 N.W.2d 879, 890-91 (1985).
In Trotalli the Wisconsin Supreme Court allowed a guardian ad litem compensation for his efforts, including an appeal, reasonably necessary to recover the fees to which he was entitled. The Trotalli court, 123 Wis. 2d at 361-65, 366 N.W.2d at 889-91, adopted the reasoning of the court of appeals dissent which noted that the approach of allowing reasonable compensation, including attorney fees on appeal, to establish entitlement to fees had been specifically endorsed by the Wisconsin Supreme Court in Thompson v. Village of Hales Corners, 115 Wis. 2d 289, 309, 340 N.W.2d 704, 713 (1983) (civil rights action,) Shands v. Castrovinci, 115 Wis. 2d 352, 359, 340 N.W.2d 506, 509 (1983) (unfair trade practices action), and Watkins v. LIRC, 117 Wis. 2d 753, 766, 345 N.W.2d 482, 488 (1984) (Wisconsin Fair Employment Act action). In each case there was no statute allowing or requiring *279 an award of reasonable attorney fees on appeal. In Shands the court said:
To permit the recovery of attorney fees for successful appellate work is simply to recognize that an attorney's effort at that stage is as essential to the tenant's success as is an attorney's work at the trial court level. Furthermore, we recognize that, if attorney fees were not recoverable on appeal, landlords could defeat the statutory purposes by the simple expedient of an appeal, which will be prohibitively expensive for many tenants; similarly, tenants would have little incentive to pursue a meritorious claim on appeal where they had not prevailed at the trial court level. In short, to deny attorney fees to tenants who need to pursue appellate review to enforce their rights would undercut the salutary objectives of the statute.
115 Wis. 2d at 359, 340 N.W.2d at 509.
In Trotalli, the court adopted the following statement of the dissent: "These cases [Thompson, Shands, and Watkins] require an award of compensation for efforts reasonably necessary to recover a statutorily authorized or required fee for legal services deemed essential to the court system or the system of justice generally." 123 Wis. 2d at 364, 366 N.W.2d at 890.
Section 814.025, Stats., is not a statute which allows or requires the award of attorney fees to a party who has prevailed in an action to enforce a statutorily conferred right. Nonetheless the award of attorney fees thereunder to the victim of a frivolous action or defense furthers an interest essential to the system of justice. Section 814.025 was intended to deter the commencing or continuing of frivolous actions and to punish those who do so. "The trial court must enforce sec. 814.025 for the purpose of maintaining *280 the integrity of the judicial system and the legal profession." Ford Motor Credit Co. v. Mills, 142 Wis. 2d 215, 219, 418 N.W.2d 14, 16 (Ct. App. 1987), quoting Stoll v. Adriansen, 122 Wis. 2d 503, 511, 362 N.W.2d 182, 187 (Ct. App. 1984).
If the victim of a frivolous action or defense may not recover appeal costs and fees the deterrence objective of sec. 814.025, Stats., will be seriously compromised. Like the landlord in Shands, the frivolous claimant or defendant could defeat the statutory purpose by the simple expedient of an appeal, which may be prohibitively expensive for many litigants. Further, the victim of a frivolous action or defense will be reluctant to appeal a trial court order or judgment denying him or her costs and attorney fees under sec. 814.025.
To permit recovery of attorney fees for successful appellate work simply recognizes that an attorney's efforts at that stage are as essential to the recovery of an award under sec. 814.025, Stats., as is the attorney's work at the trial court level. To deny attorney fees to victims of frivolous claims and defenses who need to pursue appellate review to enforce their rights would undercut the salutary objectives of sec. 814.025.
By the Court.Order reversed and cause remanded to determine costs and attorney fees to be awarded Harris under sec. 814.025(3)(b), Stats.
NOTES
[1]  The county's petition states that it is filed under sec. 227.16, Stats. That statute was renumbered sec. 227.53 by 1985 Wis. Act 182, sec. 37, effective April 22, 1986.
[2]  Section 814.025(3), Stats., provides:

(3) In order to find an action, special proceeding, counterclaim, defense or cross complaint to be frivolous under sub. (1), the court must find one or more of the following:
. . . .
(b) The party or the party's attorney knew, or should have known, that the action, special proceeding, counterclaim, defense or cross complaint was without any reasonable basis in law or equity and could not be supported by a good faith argument for an extension, modification or reversal of existing law.
