(a) Certain Defenses. Every defense to a claim for relief in any pleading must be asserted in a responsive pleading if one is required. However, a party may assert the following defenses by motion:

(1) lack of subject-matter jurisdiction;

(2) lack of personal jurisdiction;

(3) improper venue;

(4) insufficient process;

(5) insufficient service of process; and

(6) failure to state a claim upon which relief can be granted.

(b) Time to Assert Certain Defenses. A motion asserting any of these defenses under section (a) must be made before filing a responsive pleading, if one is required, except that a motion for lack of subject matter jurisdiction may be made at any time. If a pleading sets out a claim for relief that does not require a responsive pleading, an opposing party may assert at trial any defense to that claim.

(c) Motion for Judgment on the Pleadings. A party may move for judgment on the pleadings within such time so as not to delay trial.

(d) Result of Presenting Matters Outside the Pleadings. On a motion under subpart (a)(6) or section (c), if matters outside the pleadings are presented to and not excluded by the court, the motion must be treated as one for summary judgment under Rule 79. All parties must be given a reasonable opportunity to present all the material that is pertinent to the motion.

(e) Motion to Strike. Subject to the limits of Arizona Rule of Civil Procedure 7.1(f), the court may strike from a pleading or motion an insufficient claim or defense or any redundant, immaterial, impertinent, or scandalous matter. The court may act:

(1) on its own; or

(2) on motion made by a party either before responding to the pleading or, if a response is not allowed, within 20 days after the pleading is served.

(f) Motion for a More Definite Statement. If a pleading to which a responsive pleading is permitted is so vague or ambiguous that a party cannot reasonably be required to frame a responsive pleading, the party may move for a more definite statement before filing a responsive pleading. The motion must point out the defects complained of and the details desired. If the court orders a more definite statement and the order is not obeyed within 10 days after notice of the order or within the time the court sets, the court may strike the pleading or issue any other appropriate order.

(g) Waiving and Preserving Certain Defenses.

(1) Waiver of Certain Defenses. A party waives any defense listed in subparts (a)(2) through (5) by failing to either:

(A) make it by motion under this rule; or

(B) include it in a responsive pleading or in an amendment to a pleading.

(2) How to Preserve Other Defenses. Failure to state a claim upon which relief can be granted, to join a person required by Rule 33(c), or to state a legal defense to a claim may be raised:

(A) in any pleading allowed or ordered under Rule 23;

(B) by a motion under this rule; or

(C) at trial.

(h) Disposition of Rule 29 Motions. Any motion raising a defense listed in Rule 29(a)(2) through (5) must be heard and decided before trial. A motion under Rule 29(a)(6) or 29(c) must be heard and decided before trial unless the court defers ruling until trial.