
65 P.3d 103 (2003)
204 Ariz. 455
Richard UGALDE, Petitioner,
v.
The Honorable Edward O. BURKE, Judge of the Superior Court of the State of Arizona, in and for the County of Maricopa, Respondent Judge,
State of Arizona, Real Party in Interest.
No. 1 CA-SA 02-0277.
Court of Appeals of Arizona, Division 1, Department B.
March 20, 2003.
*104 Richard Romley, Maricopa County Attorney by Craig A. Raymond, Deputy County Attorney, Phoenix, Attorneys for Real Party in Interest.
Daniel R. Raynak, Phoenix, Attorney for Petitioner.

OPINION
GEMMILL, Judge.
¶ 1 The State of Arizona filed a petition accusing Richard Ugalde of being a sexually violent person ("SVP"). Ugalde seeks special action relief from the trial court's denial of his motion to dismiss the State's petition. Ugalde argues that because there has been no trial within 120 days of the filing of the petition, Arizona Revised Statutes ("A.R.S.") section 36-3706 (Supp.2002) requires that his case be dismissed. We accept jurisdiction, vacate the trial court's denial of Ugalde's motion to dismiss the SVP petition, and remand for a further determination in accordance with § 36-3706.

FACTS AND PROCEDURAL BACKGROUND
¶ 2 In May 2001, the State filed a petition against Ugalde alleging that he was an SVP. The court initially set trial for early September 2001, within 120 days of the filing of the petition. The September 2001 trial date was vacated and trial has not yet occurred. The delay resulted from various requests and motions from one or both parties, scheduling difficulties, discovery delays, and other reasons.
*105 ¶ 3 In June 2002, Ugalde filed a motion to dismiss or in the alternative to set a trial date. Ugalde argued that the SVP petition should be dismissed because the case had not been tried within 120 days after the filing of the petition as required by § 36-3706. The State responded, opposing dismissal but agreeing that a trial date should be set. A trial date was set for October 21, 2002.
¶ 4 On October 18, 2002, the court heard argument on the motion to dismiss. The court denied the motion, but expressed concern about the interpretation and application of § 36-3706. The court did not undertake to determine whether good cause existed for past postponements of the trial.[1] The court vacated the October 21, 2002 trial date on Ugalde's request, so that Ugalde could file this special action.

JURISDICTION
¶ 5 Although our acceptance of special action jurisdiction is discretionary, State ex rel. Romley v. Superior Court (Clements), 198 Ariz. 164, 165, ¶ 4, 7 P.3d 970, 971 (App. 2000), we choose to exercise special action jurisdiction in this case because Ugalde has no "equally plain, speedy, and adequate remedy by appeal." See Ariz. R.P. Spec. Act. 1 (2003). Additionally, Ugalde raises an issue of first impression, State ex rel. Romley v. Martin, 203 Ariz. 46, 47, ¶ 4, 49 P.3d 1142, 1143 (App.2002), and of statewide importance, Duquette v. Superior Court, 161 Ariz. 269, 271, 778 P.2d 634, 636 (App.1989), that requires statutory interpretation. Escalanti v. Superior Court, 165 Ariz. 385, 386, 799 P.2d 5, 6 (App.1990).

ANALYSIS
¶ 6 This matter turns on the construction and application of A.R.S. § 36-3706, which states:
Within one hundred twenty days after a petition is filed pursuant to § 36-3704, the court shall conduct a trial to determine if the person named in the petition is a sexually violent person.... The judge may continue the trial at the request of either party on a showing of good cause or on its own motion if the person will not be substantially prejudiced.
In order to properly interpret and apply a statute, we attempt to determine the legislative intent, see Zaritsky v. Davis, 198 Ariz. 599, 602, ¶¶ 9-10, 12 P.3d 1203, 1206 (App.2000), and we look first at the plain meaning of the words in the statute. See Ariz. Dept. of Revenue v. Dougherty, 200 Ariz. 515, 518, ¶ 9, 29 P.3d 862, 865 (2001); Rineer v. Leonardo, 194 Ariz. 45, 46, ¶ 7, 977 P.2d 767, 768 (1999).
¶ 7 Ugalde argues that the SVP petition should be dismissed because the 120-day period allowed by § 36-3706 expired long ago. He contends that "shall" in the first sentence of the statute is "mandatory" and requires dismissal of untried petitions lingering past the 120-day deadline. In response, the State argues that dismissal is not required because "shall" in this statute is "directory" rather than mandatory.
¶ 8 The difference between these two meanings of "shall" was explained in HCZ Construction, Inc. v. First Franklin Financial Corp., 199 Ariz. 361, 364 n. 1, ¶ 9, 18 P.3d 155, 158 n. 1 (App.2001):
When "shall" is used in the directory sense, it may indicate desirability, preference, or permission. The essential difference between a mandatory and a directory provision is that failure to comply with a directory provision does not invalidate the proceeding to which it relates, while failure to follow a mandatory provision does.
(Citations omitted). We do not base our decision in this case, however, on a characterization of "shall" as either mandatory or directory. Instead, we rely on the language of the statute itself to conclude that not all SVP petitions that remain pending beyond 120 days must be dismissed.
¶ 9 In the first sentence of § 36-3706, the legislature has plainly stated that a trial to determine if a person is an SVP shall be conducted within 120 days after the petition *106 is filed. In the last sentence of § 36-3706, the legislature has provided a narrow exception to the 120-day limitation, allowing the trial court to "continue the trial at the request of either party on a showing of good cause or on its own motion if the person will not be substantially prejudiced." Therefore, the bare fact that the 120-day period has elapsed does not automatically require a dismissal. Rather, a court considering a motion to postpone the trial beyond the 120-day limit or a motion to dismiss after the limit has been exceeded must determine whether there is "good cause" for the delay attributable to a request from either party. For any delay occasioned by a court's own motion, the statutory inquiry is whether the alleged SVP has been or will be "substantially prejudiced."
¶ 10 Whether the facts of a particular case establish "good cause" is a matter left to the sound discretion of the trial court. See Nordale v. Fisher, 93 Ariz. 342, 345, 380 P.2d 1003, 1005 (1963)("[A] motion for continuance is addressed to the sound judicial discretion of the trial court predicated on good cause."). In determining whether "good cause" exists for delay beyond the initial 120-day period, the court should carefully balance the reasons for the delay with the potential of prejudice to the alleged SVP from continued confinement while awaiting trial.
¶ 11 Various factors the court may consider in evaluating "good cause" include whether the original 120 days have already elapsed; the length of any confinement beyond the 120-day limit; the reasons for any past delay or requested postponement; whether unusual discovery or procedural problems prevented the case from proceeding to trial within 120 days; unavailability of witnesses or other evidence; whether the alleged SVP caused, contributed to, or consented to the delay;[2] whether the State diligently prosecuted the case; whether the alleged SVP sought a timely trial or warned the court and the State of the running of the 120-day period; whether the alleged SVP has been receiving treatment while confined or whether the person has simply been "warehoused"; the potential prejudice to the alleged SVP from the delay; the protection of the public; and any other factors that may be relevant in a particular case and consistent with the purposes of the SVP Act.[3]
¶ 12 Our conclusion that a trial court may, in accordance with § 36-3706, postpone an SVP trial beyond the 120-day period is not an endorsement of a lack of diligence in prosecuting these cases. There is an obvious liberty interest at stake here. This court has previously recognized that the SVP Act "provides procedural safeguards closely paralleling those that apply in criminal cases; for example, an accused SVP is entitled to appropriate notices and hearings, a probable cause determination, appointed counsel, and a jury trial." Martin, 195 Ariz. at 299, ¶ 4, 987 P.2d at 785. As part of these procedural safeguards, the legislature specified that trial courts shall conduct these trials within 120 days of the filing of the petitions. Delays extending beyond the 120-day limit should be authorized only upon a determination of good cause or if the alleged SVP will not be substantially prejudiced.
¶ 13 We further conclude that the State has a duty to prosecute these cases diligently and that trial courts also have a duty to manage these cases to comply with the 120-day deadline, allowing postponements only when justified under § 36-3706.

CONCLUSION
¶ 14 The trial court denied Ugalde's motion to dismiss the SVP petition without making the required analysis under § 36-3706. The record available to us in this special action proceeding is incomplete and insufficient for *107 such an analysis. On remand, the trial court should examine the complete record of this case to determine whether those delays attributable to the requests of either party were granted for good cause. If any delay was caused by the superior court's own motions or orders (including those of prior judges assigned to the case), the court should also determine if Ugalde was substantially prejudiced by the delay.[4] After the court has evaluated under § 36-3706 each period of delay beyond the original 120 days, the court should then grant or deny Ugalde's motion to dismiss.
¶ 15 We vacate the denial of the motion to dismiss and remand the case for further proceedings consistent with this opinion.
CONCURRING: PHILIP HALL, Presiding Judge and LAWRENCE F. WINTHROP, Judge.
NOTES
[1]  This matter was assigned to The Honorable Edward O. Burke one month before the October 18, 2002 hearing.
[2]  The analogy to excludable time under Arizona Rule of Criminal Procedure 8.4 provides helpful guidance. But proceedings under the SVP Act are civil rather than criminal, Martin v. Reinstein, 195 Ariz. 293, 307, ¶ 36, 987 P.2d 779, 793 (App.1999), and the Arizona Rules of Civil Procedure are applicable. A.R.S. § 36-3704(B)(Supp.2002).
[3]  The purposes of the SVP Act are to protect the public from sexually violent persons and to treat such people until they are no longer dangerous to others. Martin, 195 Ariz. at 299, ¶ 2, 987 P.2d at 785.
[4]  Where good cause or the absence of substantial prejudice has already been determined by the superior court at the time of a prior continuance, the court should not re-examine that issue. But if one or more postponements occurred without an explicit finding of either good cause or the absence of substantial prejudice, then the court must evaluate each such postponement to determine its propriety under § 36-3706.
