
618 N.W.2d 286 (2000)
Richard O'MALLEY, Appellant,
v.
Neil GUNDERMANN, State of Iowa, and Iowa Veterans Home, Appellees.
No. 99-0252.
Supreme Court of Iowa.
October 11, 2000.
*288 Theodore R. Hoglan of Fairall, Fairall, Kaplan, Hoglan & Condon, Marshalltown, for appellant.
Thomas J. Miller, Attorney General, and Barbara E.B. Galloway, Assistant Attorney General, for appellees.
Considered en banc.
LAVORATO, Justice.
Robert O'Malley filed a petition for writ of certiorari pursuant to Iowa Code section 35C.6 (1997) and an application to vacate pursuant to Iowa Code section 679A.12(1)(f) challenging an arbitrator's decision, which denied his grievance that he was discharged without proper cause. The district court quashed the writ granting the petition and denied the application. We affirm.

I. Background Facts and Proceedings.
The Iowa Veterans Home (IVH) in Marshalltown, Iowa, terminated O'Malley's employment on April 25, 1996. The IVH's reason for terminating O'Malley's employment was that his "conduct in regard to having knives available to residents was in violation of Work Rule C-3." Rule C-3 prohibited the "[u]nauthorized possession, use, trading, or selling of weapons ... during work hours and/or while on state property or engaged in state business."
Apparently, two residents of the IVH became involved in a disagreement. One resident threatened the other resident with a "Buck" knife that had a three-inch blade. The resident who had the knife told an IVH investigator that O'Malley had sold the knife to him. This incident led to the termination of O'Malley's employment based on an alleged violation of Work Rule C-3.
O'Malley's employment with the IVH was subject to a collective bargaining agreement (Agreement) between the State and the American Federation of State, County and Municipal Employees, Council 61 AFL-CIO. The Agreement provides a grievance procedure through which a union employee can file a "written complaint alleging a violation involving the application and interpretation of provisions of the agreement." The grievance procedure includes a four-step process through which a grievance can be addressed and resolved. See Iowa Code §§ 19A.14 (prescribing a statutory procedure to be followed for resolving grievances unless the employee is covered by a collective bargaining agreement that provides its own grievance procedure), 20.18 (providing that an agreement with an employee organization may provide procedures for the consideration of grievances and disputes regarding the interpretation and application of agreements).
In step one, the employee's union representative and the employee's supervisor attempt to resolve the grievance. If dissatisfied with the supervisor's answer, the employee may appeal to the "Appointing Authority" under step two. If dissatisfied with the employer's answer to the grievance in step two, the employee may appeal to the director of the Iowa Department of Personnel. At this step, the parties are obligated to present all evidence relevant to the grievance. The director or the director's designee is required to issue a written answer to the grievance, including the rationale for the decision.
Grievances not settled under steps one, two, and three may be appealed to arbitration. The parties may either jointly select an impartial arbitrator, or if agreement on the arbitrator cannot be reached, either or both parties may request that the Iowa Public Employment Relations Board select a five-member panel of arbitrators to resolve the grievance.
*289 According to the terms of the Agreement,
[t]he arbitrator shall only have authority to determine the compliance with the provision of [the] Agreement. The arbitrator shall not have jurisdiction or authority to add to, amend, modify, nullify, or ignore in any way the provisions of [the] Agreement and shall not make any award which in effect would grant to the Union or the Employer any matters which were not obtained in the negotiation process. The decision of the arbitrator shall be final and binding on both parties of [the] Agreement provided such decision does not exceed the arbitrator's jurisdiction or authority as set forth above.

(Emphasis added.)
Pursuant to the Agreement, O'Malley submitted a grievance form alleging that he was "discharged without just cause" and requesting that he be "reinstated and made whole."
Under the Agreement, "[a]n employee who alleges that [disciplinary] action was not based on just cause may appeal a ... discharge ... beginning with the third step of the grievance procedure." On June 12, 1996, a third-step meeting was held at the IVH. On July 12 the department of personnel issued a written answer to O'Malley's grievance. The department concluded that the IVH had "met the elements of just cause necessary to discharge [O'Malley]" and denied the grievance.
On August 8 O'Malley appealed the decision to arbitration. The parties selected Neil M. Gundermann as arbitrator to hear and determine the dispute. Gundermann held a hearing on August 28, 1997. On November 7 the arbitrator issued an award in which he (1) determined O'Malley "was discharged for proper cause" and (2) denied the grievance.
On December 8 O'Malley filed a petition in the district court against Gundermann, the State of Iowa, and the IVH seeking a writ of certiorari. O'Malley alleged the action of the arbitrator, in determining he had been discharged for just cause, was in violation of his rights as a veteran under Iowa Code section 35C.6. He further alleged that under this code provision, the arbitrator's ruling was subject to review by the district court pursuant to a writ of certiorari. O'Malley asked the court to (1) reverse and annul the arbitrator's decision and (2) award him back pay with interest plus costs and attorney fees.
On December 9 district judge Carl D. Baker issued an order for writ of certiorari, and the clerk of court issued a writ of certiorari that same day.
The IVH (1) denied the arbitrator's decision was subject to review under section 35C.6; (2) claimed that the arbitrator's decision was instead subject to review under Iowa Code section 679A.12; (3) asserted that the district court lacked subject matter jurisdiction because the petition was not filed in a timely manner; and (4) alleged that, by proceeding with arbitration, O'Malley's certiorari proceeding was barred by the doctrine of election of remedies.
Later, O'Malley dropped the arbitrator from the action and amended his petition, asserting that the action of the arbitrator was in violation of section 35C.6 and Iowa Code section 679A.12(1)(f). The IVH denied these allegations. The IVH asserted several additional defenses that are not decisive of this appeal.
Following a hearing, district judge Carl E. Peterson issued an order quashing the writ of certiorari and denying O'Malley's request to vacate the arbitration award.

II. Issues.
The district court concluded that the act complained of by O'Malley as illegal or in violation of section 35C.6 was not the act of the arbitrator but rather was the act of the public officer who had discharged O'Malley on April 25, 1996Lynne Wikle, the associate director of nursing for the IVH. The court ruled that it lacked subject matter *290 jurisdiction to consider the petition for writ of certiorari because the petition was not filed within thirty days of his termination and was therefore untimely. On appeal, O'Malley contends the district court erred in concluding his petition for writ of certiorari was untimely.
The district court also determined that the extent of its authority to review the arbitration award was greatly circumscribed. The court concluded that it could do nothing more than determine whether (1) O'Malley had alleged a violation of the Agreement and (2) the Agreement's grievance procedure authorized the arbitration of this particular dispute.
The court found that (1) O'Malley had alleged a violation of the Agreement and (2) the Agreement's grievance procedure did authorize the arbitration of this particular dispute. Having made these findings, the court concluded that its role (1) was at an end and (2) did not extend to the merits of the arbitrator's decision. On appeal, O'Malley contends the court erred in not reviewing the arbitrator's decision under the provisions of Iowa Code section 679A.12.
III. Timeliness of the Petition for Writ of Certiorari.
O'Malley petitioned for a writ of certiorari under Iowa Code section 35C.6, which provides:
No person holding a public position by appointment or employment, and belonging to any of the classes of persons to whom a preference is herein granted, shall be removed from such position or employment except for incompetency or misconduct shown after a hearing, upon due notice, upon stated charges, and with the right of such employee or appointee to a review by a writ of certiorari or at such person's election, to judicial review in accordance with the terms of the Iowa administrative procedure Act if that is otherwise applicable to their case.
(Emphasis added.)
O'Malley served in the United States Marine Corps from November 15, 1974, to November 14, 1976. Because he was honorably discharged and because his military service occurred during the Vietnam Conflict, he belongs to a class of persons "to whom a preference is herein granted" referred to in section 35C.6. See Iowa Code § 35C.1(1) (providing that honorably discharged Vietnam veterans, among others, who are citizens and residents of this state, are "entitled to preference in appointment and employment over other applicants of no greater qualifications"). O'Malley was therefore permitted to file a petition for writ of certiorari to challenge the termination of his employment. However, our inquiry does not end here. We must still determine whether the petition was filed in a timely manner under our rules pertaining to petitions for writ of certiorari.
A. Rules pertaining to petitions for writ of certiorari. Rules applicable to appeals in ordinary actions govern our review of an appeal from a district court's judgment in a certiorari proceeding. Iowa R. Civ. P. 318. Our review is limited to correction of errors at law, and we are bound by the findings of the district court if supported by substantial evidence. Iowa R.App. P. 14(f)(1); Sergeant Bluff-Luton Sch. Dist. v. City Council of Sioux City, 605 N.W.2d 294, 297 (Iowa 2000).
According to the language of Iowa Rule of Civil Procedure 306 in effect at the time of O'Malley's petition,
[a] writ of certiorari shall only be granted when specifically authorized by statute; or where an inferior tribunal, board or officer exercising judicial functions, is alleged to have exceeded its, or his, proper jurisdiction or otherwise acted illegally.
As mentioned, section 35C.6 specifically permits a veteran, who holds a public position by employment or appointment, to challenge his or her removal from such position by a petition for writ of certiorari. *291 O'Malley seeks review of the arbitrator's decision under this statute.
Iowa Rule of Civil Procedure 316 provides that, "[u]nless otherwise specially provided by statute, the judgment on certiorari shall be limited to sustaining the proceedings below, or annulling the same wholly or in part, to the extent that they were illegal or in excess of jurisdiction...." Although it provides for review of a veteran's discharge by writ of certiorari, section 35C.6 does not specify the bounds of such review. Therefore, under rule 316, review of a veteran's removal from a public position held by appointment or employment is limited to a determination of whether the person authorizing the veteran's removal acted illegally or in excess of the person's jurisdiction.
However, Iowa Rule of Civil Procedure 319 (now rule 307(c)) provides that, in order to obtain such review, the "petition must be filed within thirty days from the time the tribunal, board, or officer exceeded its jurisdiction or otherwise acted illegally." As the district court correctly noted, an untimely filing of a petition for a writ of certiorari deprives the reviewing court of subject matter jurisdiction. See Sergeant Bluff-Luton Sch. Dist., 605 N.W.2d at 297. The district court should dismiss an untimely petition. See id. at 298.
B. Analysis. As mentioned, the issue here is whether O'Malley filed his petition in a timely manner. Because review in this case is limited to questions of illegal action or action in excess of jurisdiction, we must identify the action taken that O'Malley alleges was illegal in order to determine when the thirty-day period begins to run. See id. at 297-98. For certiorari purposes, the point an illegal act occurs is when the underlying proceeding becomes final. Id. at 297.
The IVH terminated O'Malley's employment on April 25, 1996, the arbitrator filed his decision on November 7, 1997, and O'Malley filed his petition on December 7, 1997. O'Malley contends that, while he was discharged on April 25, 1996, the discharge did not become final until the arbitrator's decision on November 7, 1997. Therefore, he argues, the illegal act occurred on November 7, 1997the date of the arbitrator's decisionand that his petitionfiled on December 7, 1997was therefore timely.
In contrast, the IVH contends that the "final" action occurred when the IVH terminated O'Malley's employment on April 25, 1996, and not when the arbitrator issued his decision on November 7, 1997. Therefore, the IVH argues, if there were any illegal act, that act occurred on April 25, 1996, and O'Malley's petitionfiled on December 7, 1997is untimely. For reasons that follow, we agree.
Although O'Malley cites several cases to support his position, none of those cases is authority for the proposition that the IVH's decision to terminate his employment was not, and could not be, final until the parties proceeded through arbitration. O'Malley has cited neither case authority nor statutory authority that indicates the termination of his employment as of April 25, 1996, was merely preliminary and that further action, i.e., a final decision of the arbitrator, was required to make the discharge final.
Nor has O'Malley pointed to any language in the Agreement, the IVH policy manual, or his employment contract that suggests that a discharge is only a preliminary matter requiring further action, i.e., arbitration, before the discharge is final.
By arguing that his termination was not final until the arbitrator issued his decision, O'Malley necessarily implies that the grievance procedure serves as a mechanism through which the decision would be made as to whether he should be discharged. However, the Agreement's past-tense references to action already taken by an employer suggest that the grievance procedure is not a mechanism through which decisions are made as to whether an *292 employee should be disciplined or discharged. Rather, the grievance procedure is a mechanism through which discipline or discharge may be challenged and rectified after having already been imposed by the employer.
Finally, O'Malley has not shown that the IVH intended the termination to require subsequent approval of an arbitrator before becoming final. Unlike the cases O'Malley cites, there is no evidence or authority here for the proposition that the IVH had not or could not have chosen its final course of action on the date it terminated his employment. As the IVH points out, itnot the arbitratormade the decision to terminate O'Malley's employment.
Because the final action of the IVH occurred on April 25, 1996, O'Malley was obligated to file his petition for writ of certiorari challenging that action within thirty days of that date. Because he did not, his petition was untimely. The district court therefore lacked subject matter jurisdiction over O'Malley's petition and for that reason correctly quashed his petition for writ of certiorari.
IV. Failure to Review the Arbitrator's Decision Under Iowa Code Section 679A.12.
O'Malley's fallback position is that the district court should have reviewed the arbitrator's decision under Iowa Code section 679A.12. As mentioned, the district court employed a limited review, choosing to ignore Iowa Code section 679A.12. We agree with O'Malley that the review provisions of section 679A.12 apply to the arbitrator's decision. However, for reasons that follow, we think the district court did not err in denying O'Malley's application challenging the arbitrator's decision.
O'Malley asserted in the district court that he was entitled to a sufficiency-of-the-evidence review under Iowa Code section 679A.12(1)(f). Because this was the only ground of review under section 679A.12 alleged before the district court, O'Malley is limited to that ground on appeal. See Peters v. Burlington N. R.R., 492 N.W.2d 399, 401 (Iowa 1992) (holding that issues must be raised in and decided by the district court before they may be raised and decided on appeal).
Iowa Code section 679A.12 provides in pertinent part:
1. Upon application of a party, the district court shall vacate an award if any of the following apply:
....

f. Substantial evidence on the record as a whole does not support the award. The court shall not vacate an award on this ground if a party urging the vacation has not caused the arbitration proceedings to be reported, if the parties have agreed that a vacation shall not be made on this ground, or if the arbitration has been conducted under the auspices of the American arbitration association.
(Emphasis added.) Therefore, according to the emphasized language, the substantial-evidence review does not apply if the proceedings before the arbitrator were not reported or the parties have agreed that this type of review would not apply to the arbitrator's decision.
Here, as the IVH points out, the record before the district court does not show that the arbitration proceedings were reported. Additionally, the Agreement clearly provides that the decision of the arbitrator shall be binding on both parties. This provision of the Agreement clearly implies that the parties did not intend that the arbitrator's decision would be subject to a substantial-evidence challenge or review. Therefore, the district court was correct in refusing to vacate the arbitrator's decision, although it did so for a different reason. We affirm the decision of the district court on this issue. See Rouse v. Union Township, 530 N.W.2d 714, 717 (Iowa 1995) (noting this court is obligated to affirm an appeal in which any proper basis appears in the record for a district court's ruling even though it is not *293 one upon which the court based its decision).

V. Disposition.
Because O'Malley did not file his petition for writ of certiorari in a timely manner, the district court did not have subject matter jurisdiction and for that reason correctly quashed the writ. Additionally, because O'Malley failed to establish his right to a substantial evidence review under Iowa Code section 679A.12(1)(f), we affirm the district court's decision refusing to vacate the arbitrator's decision.
AFFIRMED.
All justices concur except SNELL, J., who takes no part.
