
393 N.W.2d 324 (1986)
MODERATE INCOME HOUSING, INC., Appellant,
v.
BOARD OF REVIEW OF POTTAWATTAMIE COUNTY, Iowa, Appellee.
No. 85-1700.
Supreme Court of Iowa.
September 17, 1986.
Michael G. Reilly of Perkins, Sacks, Hannan & Reilly, Council Bluffs, for appellant.
Frank W. Pechacek, Jr., and Randy R. Ewing of Smith, Peterson, Beckman & Willson, Council Bluffs, for appellee.
Considered by REYNOLDSON, C.J., and McGIVERIN, LARSON, SCHULTZ and WOLLE, JJ.
SCHULTZ, Justice.
In this appeal a taxpayer, a corporate property owner, commenced an equity action against a county board of review requesting the district court to order the board to reconvene and act on the taxpayer's protest to its tax assessment. Taxpayer's petition did not specifically allege it sought an order of mandamus; however, counsel in appellate argument stated that mandamus was the relief sought. The district court sustained a special appearance holding that it did not have original jurisdiction on an assessment case and that an *325 appeal pursuant to Iowa Code section 441.38[1] was the sole statutory remedy available to the aggrieved taxpayer. The taxpayer maintains the board took no action on its protest; thus the court had no jurisdiction over the case by way of appeal. Consequently, the taxpayer claims it had a right to bring this action.
The disposition of this action was reached without an evidentiary hearing; therefore, we look to the pleadings for the alleged facts. Moderate Income Housing, Inc., a Missouri corporation, is the titleholder of the property in question and is the aggrieved taxpayer. On May 1, 1985, Charles A. Brents, of Lee's Summit, Missouri, who the taxpayer alleges is its vice-president and duly authorized agent, filed a protest with the Board of Review of Pottawattamie County concerning the 1985 assessment against the real estate in the sum of $1,800,000. Allegedly, on May 20 Brents, acting on behalf of the taxpayer, appeared before the board and an evidentiary hearing was held. On May 21 the board notified Brents that the protest "was reviewed by the board." The notice stated:
The board hereby informs you that your protest is not valid. Your 1985 assessment is hereby certified to be $1,800,000. The reason for the board's action is: protest not filed or made by a property owner or aggrieved taxpayer of this county, therefore petition is not valid and board has no jurisdiction.
The taxpayer responded to the notice by filing this equity action. Taxpayer alleged it had no right to appeal because the board failed to take jurisdiction of its protest, and sought a court decree ordering the board to reconvene and act on its protest.
The taxpayer's action was disposed of without further pleading or evidence. The board filed a special appearance maintaining that the court did not have jurisdiction to review a tax assessment when the board did not have jurisdiction. The district court sustained the special appearance noting that it had jurisdiction of the parties and of the subject matter involved; however, it determined that an appeal pursuant to section 441.38 provided the sole statutory means of approaching this problem. The gist of the ruling was that the district court lacked authority over assessment cases, absent an appeal. The effect of the ruling was a dismissal of the action for failure to state a claim on which any relief can be granted. See Iowa R.Civ.P. 104(b). Consequently, we shall treat the ruling as a dismissal.
We agree with the district court that mandamus is not the appropriate action under these facts. Mandamus is statutorily defined as follows:
The action of mandamus is one brought to obtain an order commanding an inferior tribunal, board, corporation, or person to do or not to do an act, the performance or omission of which the law enjoins as a duty resulting from an office, trust, or station.
Iowa Code § 661.1. Mandamus will not lie if there is another remedy at law. Iowa Code § 661.7 ("[a]n order of mandamus shall not be issued in any case where there is a plain, speedy and adequate remedy in the ordinary course of the law...."). See also Hewitt v. Ryan, 356 N.W.2d 230, 233 (Iowa 1984) (when a remedy is available through appeal, mandamus should not be ordered); Stafford v. Valley Community School District, 298 N.W.2d 307, 309 (Iowa 1980) (certiorari is a remedy that precludes the use of a mandamus action).
*326 The taxpayer urges that it could not have appealed because the board took no action. It points out that the board of review has statutory power to equalize assessment by raising or lowering the individual assessments of real property under Iowa Code section 441.35; however, it maintains that the board "did not exercise any of its statutory powers" and simply took no action on the protest. It urges that the board did not act on the protest because it decided it had no jurisdiction of the protest. The board does not concede that it had jurisdiction to grant relief on the protest; however, it claims the taxpayer's remedy with reference to the protest was to appeal to the district court.
An administrative agency has the authority and duty to determine its own limits of statutory authority, although it is the function of the judiciary to finally decide the limits of the authority of the agency. See 2 Am.Jur.2d Admin. Law §§ 332, 491, 691 (1962); 73 C.J.S. Public Admin. Law and Procedures §§ 64, 241 (1983).
Once the agency has determined its jurisdiction or otherwise acted, its authority to act is subject to judicial scrutiny either by appeal or by a certiorari action. Anstey v. Iowa State Commerce Commission, 292 N.W.2d 380, 384 (Iowa 1980) (substantial evidence test governs judicial review of agency action on question of jurisdictional facts under Iowa Code ch. 17A); Laughlin v. Franc, 247 Iowa 345, 351, 73 N.W.2d 750, 753-54 (1955) (both statutory appeal and a certiorari action are proper remedies to challenge subject matter jurisdiction questions caused by decision of fence viewers rendered under Iowa Code ch. 113); Bidwell Coal Co. v. Davidson, 187 Iowa 809, 819, 174 N.W. 592, 595 (Iowa 1919) (in worker's compensation cases there is an appeal from the industrial commissioner's decision concerning jurisdictional facts). Furthermore, we have stated in a tax assessment case that "[j]urisdictional questions may be raised on appeal as well as by other proceedings." Shirk v. Township Board of Review, 137 Iowa 230, 232, 114 N.W. 884, 884 (1908). The taxpayer had a remedy by appeal; the trial court was correct in determining that mandamus was not an available remedy.
In addition to appeal, the taxpayer has a remedy in certiorari when the error or illegality invalidates the tax. See Dickey v. County of Polk, 58 Iowa 287, 290, 12 N.W. 290, 292 (1882). The general rule is that review of an erroneous assessment is by complaint to the board of review and then appeal to the district court. See First National Bank v. Board of Review, 200 Iowa 131, 132, 204 N.W. 223, 224 (1925). However, in the present case it is alleged that the board acted illegally by failing to take jurisdiction. "Certiorari" is a writ of review to determine whether questioned acts were legal. Erb v. Iowa State Board of Public Instruction, 216 N.W.2d 339, 342 (Iowa 1974). A writ of certiorari may be sought when an inferior tribunal or board "exercising judicial functions, is alleged to have ... acted illegally." Iowa R.Civ.P. 306. A board may act illegally by incorrectly applying the law or by making findings of fact that were not supported by substantial evidence. State ex rel. Shanahan v. Iowa District Court, 356 N.W.2d 523, 526 (Iowa 1984). Because it is unclear whether the board acted illegally in deciding it lacked jurisdiction, review by certiorari is proper. The court must determine whether there is substantial support in the evidence for the findings on which the board based its conclusion of law that it lacked jurisdiction. See Reed v. Gaylord, 216 N.W.2d 327, 334 (Iowa 1974).
As we have concluded that mandamus was not the proper remedy, we affirm the dismissal of the taxpayer's mandamus action.
This does not conclude the proceedings, however. Iowa Rule of Civil Procedure 107 provides that in case of mandamus, "where the facts pleaded and proved do not *327 entitle the petitioner to the specific remedy asked, but do show him entitled to another remedy, the court shall permit him on such terms, if any, as it may prescribe, to amend by asking for such latter remedy, which may be awarded." In other cases we have rejected mandamus and remanded to allow for an amendment of the petition. Stafford v. Valley Community School District, 298 N.W.2d at 310; Stith v. Civil Service Commission, 159 N.W.2d 806, 809 (Iowa 1968). Without deciding the merits of such a motion to amend, we remand to allow taxpayer to request such relief under Rule 107.
AFFIRMED AND REMANDED.
NOTES
[1]  Section 441.38 provides:

Appeals may be taken from the action of the board of review with reference to protests of assessment, to the district court of the county in which such board holds its sessions within twenty days after its adjournment. No new grounds in addition to those set out in the protest to the board of review as provided in section 441.37 can be pleaded, but additional evidence to sustain said grounds may be introduced. The assessor shall have the same right to appeal and in the same manner as an individual taxpayer, public body or other public officer as provided in section 441.42. Appeals shall be taken by a written notice to that effect to the chairperson or presiding officer of the board of review and served as an original notice.
