
621 N.W.2d 189 (2001)
DIRECTOR OF the IOWA DEPARTMENT OF HUMAN SERVICES and Director of the Iowa Department of Corrections, Plaintiffs,
v.
IOWA DISTRICT COURT FOR JEFFERSON COUNTY, Defendant.
No. 98-0893.
Supreme Court of Iowa.
January 18, 2001.
*190 Thomas J. Miller, Attorney General, and Stephen C. Robinson and Layne Lindebak, Assistant Attorneys General, for plaintiffs.
Thomas M. Walter of Johnson, Hester, Walter & Breckenridge, L.L.P., Ottumwa, for defendant.
Considered en banc.
LAVORATO, Chief Justice.
The Director of the Department of Human Services and the Director of the Department of Corrections filed a petition for writ of certiorari in this court, challenging a district court judgment ordering the State to pay the costs of a criminal defendant's care. This court determined that a writ should issue and entered an order to that effect. Because we conclude the two directors did not file the petition in a timely manner, we annul the writ.

I. Background Facts and Proceedings.
On December 4, 1995, the State filed a trial information charging Carlton Robert Ward with a variety of offenses, including lascivious acts with a child, a class D felony. See Iowa Code § 709.8 (1995). Several months later, Ward's counsel filed a motion to determine Ward's competency. See Iowa Code § 812.3. Following a hearing to determine Ward's competency, the district court entered an order on May 28, 1996. In the order, the district court (1) found that Ward was incompetent, (2) ordered no further proceedings be taken until Ward's competency was restored, and (3) committed Ward to the custody of the Iowa Department of Human Services (DHS) for placement in the Iowa Mental Health Institute (IMHI) at Mount Pleasant, Iowa. See Iowa Code § 812.4.
Following a hearing on February 24, 1997, the district court found that it was not necessary for Ward to be placed at the IMHI and that further reports were needed before the court could determine Ward's competency. The court ordered that Ward "be placed at ResCare Cedar Creek Facility in Fairfield, Iowa, as a special ward, and that said placement shall include supervision and administration of medications...."
The record reflects that Ward pleaded guilty to lascivious acts with a child on July 8, 1997. The record does not reflect any determination that Ward's competency had been restored sufficiently to enable him to enter the plea. See Iowa Code § 812.5. We assume for the purposes of this appeal that the district court made such a determination.
On February 9, 1998, the district court entered a judgment of conviction and sentence. The court ordered that Ward be committed to the custody of the Iowa Department of Corrections (DOC) for a term not to exceed five years. See Iowa Code § 902.9(4). The court suspended the sentence, pending Ward's future good behavior and placed him on probation to the *191 Eighth Judicial District Department of Correctional Services for five years. See Iowa Code § 907.3(3). The court further ordered that, "[a]s a specific term of probation, the defendant shall reside in the Cedar Creek ResCare Facility or a like facility."
The court additionally ordered Ward to apply all of his social security resources, except for a minimal amount for personal expenses, "to his costs at the care center." The court ordered the State to "pay for all amounts not covered by the defendant's social security."
As part of a plea bargain and at the request of the county attorney, the court ordered the State to pay (1) the remaining balance on the IMHI bill at Mount Pleasant, Iowa, in the amount of $20,581.78; (2) the unpaid balance due to Cedar Creek ResCare facility in the amount of $5967.43; and (3) any costs beyond Ward's contribution for any future care.
On May 11, 1998, the district court entered an order in which it found that the State had failed to make the payments for Ward's care at the Cedar Creek ResCare facility as set out in the February 9, 1998 judgment. The court ordered the director of DHS and the director of DOC to appear before the court "to determine why such payments have not been made." The record shows that this order was faxed to the director of the DHS on May 18, 1998. The DOC learned of the order on May 20, 1998.
On May 29 the director of DHS and the director of DOC filed in this court a petition for writ of certiorari and request for stay. They contended the district court exceeded its jurisdiction and/or acted illegally when it ordered the State to pay the costs noted in the February 9, 1998 judgment. Additionally, they asserted the district court lacked personal jurisdiction over them to order their appearance in court pursuant to its May 11, 1998 order. We issued the writ on July 10 and stayed the district court's May 11 order, pending further order of this court.

II. Scope of Review.
An original action in this court proceeds under Iowa Rule of Appellate Procedure 303. So far as applicable the action is by ordinary proceedings. See Iowa R.Civ.P. 307(b). In this original certiorari action, the two directors are the plaintiffs, the district court is the named or nominal defendant, and Ward is the underlying defendant. See Iowa R.App. P. 303.
A writ of certiorari lies where a lower board, tribunal, or court has exceeded its proper jurisdiction or otherwise has acted illegally. Iowa R.Civ.P. 306. Therefore, "we may examine only the jurisdiction of the district court and the legality of its actions." Christensen v. Iowa Dist. Ct., 578 N.W.2d 675, 678 (Iowa 1998). "Illegality exists when the court's findings lack substantial evidentiary support, or when the court has not properly applied the law." Id. Our review of the district court's action is therefore for correction of errors of law. See Iowa R.App. P. 4; French v. Iowa Dist. Ct., 546 N.W.2d 911, 913 (Iowa 1996).

III. Issues.
The issues the plaintiffs raise before us are the ones asserted in the petition for writ of certiorari. Ward, the defendant in the underlying criminal case, has assumed representation of the district court, the nominal defendant. Ward contends that the petition for writ of certiorari is untimely and should therefore be dismissed. He further contends that, even if the petition is timely, the writ should be annulled because the district court has (1) inherent authority under article V of the Iowa Constitution and (2) statutory authority pursuant to Iowa Code chapters 901 and 907 to order the State to pay the contested costs.
For reasons that follow, we think the petition for certiorari was untimely as to the February 9, 1998 judgment but was timely as to the May 11, 1998 order. Therefore, we restrict our discussion to the timeliness issue regarding the February *192 9 order and the propriety of the May 11 order.
IV. Timeliness of the Petition for Writ of Certiorari.
Iowa Rule of Civil Procedure 307(c) provides:
The petition [for writ of certiorari] must be filed within thirty days from the time the tribunal, board or officer exceeded its jurisdiction or otherwise acted illegally. An extension of such time, however, may be allowed by the reviewing court upon a showing that failure to file the petition within the time provided was due to a failure of the tribunal, board or officer to notify the petitioner of the action complained of. Any motion for extension of time shall be filed with the clerk of the court in which the writ of certiorari is sought within 90 days of the action complained of.
Iowa R.Civ.P. 307(c) (emphasis added).
According to the rule, the petition must be filed within thirty days from the time the tribunal exceeded its jurisdiction or otherwise acted illegally. Here, the judgment in question was entered on February 9, 1998. The thirty-day deadline for filing the petition therefore expired on March 11, 1998. The petition was filed on May 29, 1998. Consequently, the petition was untimely.
However, this court may grant an extension of time to file the petition if it is shown that the "failure to file the petition within the time provided was due to a failure of the tribunal ... to notify the petitioner of the action complained of." Iowa R. Civ. P. 307(c). But, a motion asking for such extension must be filed with the clerk of this court "within 90 days of the action complained of." Id.
Here, the plaintiffs point out that they did not receive notice of the February 9 Judgment until May 18 (DHS) or May 20 (DOC). However, the plaintiffs did not file a motion with this court asking for an extension. Nor did they ask this court to treat their petition as a request for an extension. However, even if we construe the petition as additionally embodying a request for an extension, the request would still be untimely because the petition was filed 109 days after the "action complained of." Rule 307(c) is clear that requests for additional time to file a petition for writ of certiorari based on a tribunal's failure to notify the plaintiff of the action complained of must still be filed within ninety days of the action complained of. The petition for writ of certiorari was therefore untimely.
One may argue that strict adherence to the rule under the circumstances here is unfair because the plaintiffs never received notice in time to file for an extension of time. In other words, it seems unfair to punish a plaintiff for failing to file a petition for a writ of certiorari in a timely manner when that failure was through no fault of the plaintiff. On the other hand, while rule 307(c) recognizes that in some cases it might be impossible to file a timely petition, it also recognizes that at some point, regardless of those circumstances, the courts must "draw the line."
We conclude that we have no jurisdiction to consider the petition for writ of certiorari, and for that reason we must dismiss it. See O'Malley v. Gundermann, 618 N.W.2d 286, 291 (Iowa 2000) (holding that an untimely filing of a petition for a writ of certiorari deprives the reviewing court of subject matter jurisdiction, and for that reason the petition must be dismissed). Having reached this conclusion, we do not imply that what the county attorney did here was binding on the plaintiffs or that the February 9 judgment was binding on them. Our conclusion that we have no jurisdiction does not preclude the plaintiffs from contending in any future litigation that, because they were not parties to the action and had no prior notice, they were not bound by the judgment. We express no opinion as to the merits of these issues.


*193 V. The Propriety of the May 11, 1998 Order.
As mentioned, on May 11, 1998, the district court ordered the director of DHS and the director of DOC to appear before it to determine why the State had not made the payments set out in the February 9, 1998 judgment. The plaintiffs challenge the order, contending the court did not have personal jurisdiction over them and the order did not require them to do anything. The plaintiffs' petition for writ of certiorari challenging this action was timely because it was filed within thirty days of the May 11 order.
It is true, as the plaintiffs contend, that they were not parties to the underlying criminal action and the February 9 judgment did not order either one of the plaintiffs to do anything. However, the February 9 judgment did require "the State" to make the payments for Ward's care. We construe the May 11 order as one merely asking for information as to why the State had not made the payments and not one seeking to hold the plaintiffs in contempt of court. The plaintiffs were in the best position to explain why the State did not make the payments. In addition, a hearing as provided for in the May 11 order would have given the plaintiffs an opportunity to explain their position and perhaps convince the court to set aside the February 9 judgment.
We conclude the district court acted legally and within its jurisdiction when it entered the May 11 order. We suggest, however, that judges refrain from ordering department heads to appear before them without offering such officials an opportunity to designate suitable representatives to appear in their stead. See In re D.C.V., 569 N.W.2d 489, 495 (Iowa 1997).

VI. Disposition.
Because the plaintiffs did not file the petition for writ of certiorari in a timely manner, we must annul the writ with regard to the February 9, 1998 judgment. Because we conclude the district court acted legally and within its jurisdiction when it entered the May 11 order, we also annul the writ as to that order.
WRIT ANNULLED.
