A. When Presented.
1. A respondent shall serve and file a response within twenty (20) days after the service of the summons and petition upon the respondent, except as otherwise provided in Rule 42(J).
2. Unless a different time is fixed by court order, the service of a motion permitted under this rule alters these periods of time; if the court denies the motion or postpones its disposition until the trial on the merits, the responsive pleading shall be served within ten (10) days after notice of the court’s action.
B. How Presented; Motion to Dismiss. Every defense, in law or fact, to a claim for relief in any pleading, shall be asserted in the response if one is required, except that the following defenses may at the option of the pleader be made by motion:
1. lack of jurisdiction over the subject matter;
2. lack of jurisdiction over the person;
3. improper venue;
4. insufficiency of process;
5. insufficiency of service of process; or
6. failure to state a claim upon which relief can be granted.
A motion making any of these defenses shall be made before pleading if a further pleading is permitted. No defense or objection is waived by being joined with one or more other defenses or objections in a responsive pleading or motion. If a pleading sets forth a claim for relief to which the adverse party is not required to serve a responsive pleading, the adverse party may assert at the trial any defense in law or fact to that claim for relief. A defense of improper venue may be made only if the action cannot be or could not have been transferred to the proper county pursuant to A.R.S. § 12-404. If, on a motion asserting the defense to dismiss for failure of the pleading to state a claim upon which relief can be granted, matters outside the pleading are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in Rule 79, and all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by Rule 79.
C. Motion for Judgment on the Pleadings. After the pleadings are closed but within such time as not to delay the trial, any party may move for judgment on the pleadings. If, on a motion for judgment on the pleadings, matters outside the pleadings are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in Rule 79, and all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by Rule 79.
D. Preliminary Hearings. On application of any party, the defenses specifically enumerated as 1 through 6 in paragraph B, whether made in a pleading or by motion, and the motion for judgment mentioned in paragraph C shall be heard and determined before trial unless the court orders that the hearing and determination thereof be deferred until the trial.
E. Motion to Strike. Upon motion made by a party before responding to a pleading or, if no responsive pleading is permitted by these rules, upon motion made by a party within twenty (20) days after service of the pleading upon the party or upon the court’s own initiative at any time, the court may order stricken from a pleading any insufficient defense or any redundant, immaterial, impertinent, or scandalous matter.
F. Waiver or Preservation of Certain Defenses. A party waives all defenses and objections not presented either by motion or in that party’s answer or response, except:
1. a defense of lack of jurisdiction over the person, improper venue, insufficiency of process, or insufficiency of service of process is waived unless it is made by motion under this rule or included in a responsive pleading or an amendment thereof permitted by Rule 34(A); and
2. a defense of failure to state a claim upon which relief can be granted and an objection of failure to state a legal defense to a claim may be made in any pleading permitted or ordered under Rules 24 and 28, or by motion for judgment on the pleadings, or at the trial on the merits.
G. Subject Matter Jurisdiction. Whenever it appears to the satisfaction of the court that it lacks subject matter jurisdiction, the court shall dismiss the action.