This Court granted review of a superior court’s ruling that (1) denied the City of Spokane’s motion to quash the interlocutory writs of review and (2) invalidated a portion of the Spokane Municipal Code (which adopted RCW 46.61.5055) based on a violation of equal protection. We find that no statutory writ should have been granted under the facts of these cases and the superior court abused its discretion by failing to quash the writs. These cases are reversed and remanded to the district court for trial.
FACTS
Background
On April 12, 1999, Alvin Commanda was charged with driving while under the influence of intoxicants (DUI) in violation of Spokane Municipal Code (SMC) 16.61.502. On August 9, 1999, Dean Bendickson was charged with DUI in violation of the same ordinance. Commanda’s breath alcohol level was three times the legal limit (.247 and .221), as was Bendickson’s breath alcohol level (.242 and .225). Both Commanda and Bendickson have been charged, but they have not pleaded to or been convicted of the charges.
Procedural History
District Court
During the pretrial stage, on February 17, 2000, Commanda and Bendickson filed motions to dismiss their DUI charges. On April 13, 2000, defense counsel asserted that the DUI sentencing scheme’s enhanced penalty for alcohol violators with breath alcohol concentration (BAC) levels exceeding .15 violated equal protection under the state and federal constitutions. On April 17, 2000, Spokane *654Municipal Court Judge Christine Cary denied the motions to dismiss the DUI charges and continued both pretrial conferences. Finding no suspect or semisuspect class had been established, Judge Cary applied the rational basis test to the Fourteenth Amendment equal protection claim. Finding that the legislature had a rational basis for enhancing the penalty, she denied the motions to dismiss.
Superior Court
On May 18, 2000, Commanda and Bendickson each obtained an ex parte emergency writ of review and a stay of the lower court proceedings. The crux of the rulings on the writs was that the DUI statutory sentencing scheme violated equal protection. On May 26, 2000, the City moved to quash the writs, arguing that procedurally they would not terminate litigation and that substantively equal protection was not violated. On June 2, 2000, Judge Ellen Kalama Clark denied the City’s motion to quash the writs. On June 22, 2000, at conclusion of law 2.5, Judge Clark stated that “SMC § 16.51.5055, violate[s] equal protection.” Clerk’s Papers (CP) at 119.
On July 21, 2000, the City timely sought discretionary review, which this Court granted on August 31, 2000.
ANALYSIS
Standard of Review
The standard of review specified in RCW 7.16.120 provides that issues of law are reviewed to determine whether the decision below was contrary to law. RCW 7.16.120(3). The superior court’s decision to issue a writ is reviewed de novo. Sunderland Family Treatment Servs. v. City of Pasco, 127 Wn.2d 782, 788, 903 P.2d 986 (1995).
Abuse of Discretion
The City argues that the superior court abused it discretion by refusing to quash the writs of review because the statutory prerequisites were not met.
There are two categories of writs: (1) the constitu*655tional common law writ, and (2) the statutory writ. Bridle Trails Cmty. Club v. City of Bellevue, 45 Wn. App. 248, 252, 724 P.2d 1110 (1986). The Washington Constitution empowers the superior court to issue a common law writ of review on a petition by a person in actual custody, and other appellate power is prescribed by statute. Wash. Const. art. IV, § 6. Since Bendickson and Commanda are charged with DUI and are not in custody, the writ at issue is statutory.
“The statutory writ of certiorari is an extraordinary remedy.” Odegaard v. Everett Sch. Dist. No. 2, 55 Wn. App. 685, 687, 780 P.2d 260 (1989) (citing State ex rel. Gebenini v. Wright, 43 Wn.2d 829, 830, 264 P.2d 1091 (1953)). Statutory writs are governed by chapter 7.16 RCW. City of Seattle v. Williams, 101 Wn.2d 445, 454, 680 P.2d 1051 (1984). All statutory prerequisites must be present before a writ may be granted. Bridle Trails, 45 Wn. App. at 252. The grounds in which a writ may be granted are delineated in RCW 7.16.040, which states:
A writ of review shall be granted by any court, except a municipal or district court, when an inferior tribunal, board or officer, exercising judicial functions, has exceeded the jurisdiction of such tribunal, board or officer, or one acting illegally, or to correct any erroneous or void proceeding, or a proceeding not according to the course of the common law, and there is no appeal, nor in the judgment of the court, any plain, speedy and adequate remedy at law.
The superior court may grant a writ of review only if: (1) the district court exceeded its jurisdiction or acted illegally; and (2) there is no appeal or adequate remedy at law. RCW 7.16.040. Unless both elements are present, the superior court has no jurisdiction for review. Williams, 101 Wn.2d at 454.
The City cites State v. Epler, 93 Wn. App. 520, 523, 969 P.2d 498 (1999): “The threshold, and dispositive, question is whether the superior court had authority to issue the writ of review.” The threshold question for a discretionary writ is not whether the district court committed error of law, but whether the court had jurisdiction to decide the *656motion. Id. at 524. If the court has subject matter jurisdiction, a merely erroneous ruling is not an act in excess of the court’s jurisdiction, and therefore no writ lies. Id. The court’s exercise of discretion is not reviewable by extraordinary writ. Id. The defendants distinguish Epler “because it involved a superior court’s discretionary ruling on a CrRLJ 8.3(b) (dismissal in furtherance of justice) motion. .. .At issue here is not a discretionary decision, rather the issue goes to the elements of and punishment for the crime with which respondents are charged.” Br. of Resp’ts at 5-6.
Defendants’ claim, that any issue “which goes to the elements of and punishment for the crime” charged may be raised by a statutory writ, is unsupported by authority. Moreover, such a holding would broaden the scope of the statutory writ so as to be generally available rather than to be an extraordinary remedy as consistently held. Odegaard, 55 Wn. App. at 687; Williams, 101 Wn.2d at 455.
Defendants also claim that a writ should lie due to the limited number of district court judges available to hear such motions. “[T]he writ of review process is the most expeditious way of handling such a legal challenge.” Br. of Resp’ts at 3. Although the writ may be convenient, no authority supports its use as a matter of expediency.
A writ is proper only when there is not any “plain, speedy and adequate remedy in the ordinary course of law.” RCW 7.16.300. “The fact that an appeal will not lie directly from an interlocutory order is not a sufficient basis for a writ of review if there is an adequate remedy by appeal from the final judgment.” Epler, 93 Wn. App. at 525. “Under the RALJ [Rules for Appeal of Decisions of the Courts of Limited Jurisdiction], an interlocutory order is reviewable on appeal from the ultimate judgment.” Id.
In an Issaquah district court case, defendant Alter was charged with DUI, and he petitioned for a writ pursuant to chapter 7.16 RCW. Alter v. Issaquah Dist. Court, 35 Wn. App. 590, 591, 668 P.2d 609, review denied, 100 Wn.2d 1030 (1983). Division One found that when a defendant “has not *657even been convicted, much less exercised her right of appeal to the superior court for any conviction entered,” the defendant has “an adequate remedy by appeal under the Rules for Appeal of Decisions of Courts of Limited Jurisdiction, [and] the writ of certiorari was properly denied.” Alter, 35 Wn. App. at 591. Moreover, the court stated that “[i]n this posture, the case is frivolous and would be subject to dismissal.” Id. (citing RAP 18.9(c)).
Commanda and Bendickson “agree that they have a right to a RALJ appeal from a conviction.” Br. of Resp’ts at 4. However, they argue that “[a] remedy by RALJ appeal is inadequate because respondents would have to go through unnecessary trials.” Id. In essence, defendants have conceded there is an adequate remedy at law after the final judgment. In spite of this concession, they argue “there is no appeal, nor any plain, speedy and adequate remedy at law.” CP at 2. However, this argument is without any supporting authority.
Once the defendants have been convicted of or have pleaded guilty to the charges, they have an adequate remedy at law through a RALJ appeal. The district court had jurisdiction to deny the motions to dismiss the DUI charges. Therefore, no writ of review should have been granted.
The writ of review should have been quashed, since both defendants failed to establish the statutory prerequisites. Finding abuse of discretion denying the motion to quash the writs of review, we reverse and order both cases remanded to the district court for trial.
Alexander, C.J., and Smith, Johnson, Madsen, Sanders, Bridge, Chambers, and Owens, JJ., concur.