A pleading must contain a counterclaim for every claim then matured, and not the subject of a pending action, held by the pleader against any opposing party and arising out of the transaction or occurrence that is the basis of such opposing party’s claim, unless its adjudication would require the presence of indispensable parties of whom jurisdiction cannot be acquired. A final judgment on the merits shall bar such a counterclaim, although not pleaded.
Iowa. R. Civ. P. 1.241