
23 P.3d 1086 (2001)
143 Wash.2d 651
Alvin George COMMANDA, Respondent,
v.
The Honorable Christine CARY, Spokane County District Municipal Department, Judge in her official capacity, and the Clerk of the Municipal Court, in her official capacity, Petitioners.
Dean M. Bendickson, Respondent,
v.
The Honorable Christine Cary, Spokane County District Municipal Department, Judge in her official capacity, and the Clerk of the Municipal Court, in her official capacity, Petitioners.
Nos. 69887-2, 69888-1.
Supreme Court of Washington, En Banc.
Argued March 22, 2001.
Decided May 31, 2001.
*1087 Salvatore Faggiano, Michelle D. Szambelan, Asst. Spokane City Attorneys, Spokane, for Petitioners.
Katherine Knox, Gerhard R. Dunlap, Spokane, for Respondents.
IRELAND, J.
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.


*1088 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 Municipal Court Judge Christine Cary denied the motions to dismiss the DUI charges and continued both pretrial conferences. Finding no suspect or semi-suspect 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 Wash.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 constitutional common law writ, and (2) the statutory writ. Bridle Trails Cmty. Club v. City of Bellevue, 45 Wash.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 Wash.App. 685, 687, 780 P.2d 260 (1989) (citing State ex rel. Gebenini v. Wright, 43 Wash.2d 829, 830, 264 P.2d 1091 (1953)). Statutory writs are governed by chapter 7.16 RCW. City of Seattle v. Williams, 101 Wash.2d 445, 454, 680 P.2d 1051 (1984). All statutory prerequisites must be present before a writ may be granted. Bridle Trails, 45 Wash.App. at 252, 724 P.2d *1089 1110. 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 Wash.2d at 454, 680 P.2d 1051.
The City cites State v. Epler, 93 Wash.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 motion. Id. at 524, 969 P.2d 498. 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 Wash.App. at 687, 780 P.2d 260; Williams, 101 Wash.2d at 455, 680 P.2d 1051.
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 Wash.App. at 525, 969 P.2d 498. "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 petitioned for a writ pursuant to chapter 7.16 RCW. Alter v. Issaquah Dist. Court, 35 Wash.App. 590, 591, 668 P.2d 609, review denied, 100 Wash.2d 1030 (1983). Division One found that when a defendant "has not even 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 Wash. App. at 591, 668 P.2d 609. 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 *1090 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., SMITH, JOHNSON, MADSEN, SANDERS, BRIDGE, CHAMBERS, and OWENS, JJ., concur.
