15-6-13(a). Compulsory counterclaims. A pleading shall state as a counterclaim any claim which at the time of serving the pleading the pleader has against any opposing party, if it arises out of the transaction or occurrence that is the subject matter of the opposing party's claim and does not require for its adjudication the presence of third parties of whom the court cannot acquire jurisdiction. But the pleader need not state the claim if:
(1) At the time the action was commenced the claim was the subject of another pending action; or
(2) The opposing party brought suit upon his claim by attachment or other process by which the court did not acquire jurisdiction to render a personal judgment on that claim, and the pleader is not stating any counterclaim under § 15-6-13; or
(3) If the claim is not one over which the court would have jurisdiction if brought as an original action.Source: SDC 1939 & Supp 1960, § 33.0911; SD RCP, Rule 13 (a), as adopted by Sup. Ct. Order March 29, 1966, effective July 1, 1966.