“The last pleading” defined

The “last pleading” is defined as “the answer ordinarily is the last pleading, but when the defendant’s answer contains a counterclaim, plaintiff’s answer to it is the last pleading. When the defendants answer has a cross claim, the answer of the cross-defendant to it is the last pleading. Where the plaintiff’s answer to a counterclaim contains a counter claim against the opposing party or a cross-claim against a co-defendant, the answer of the co-defendant to the cross-claim is the last pleading. And where the plaintiff files a reply alleging facts in denial or avoidance of new matter by way of defense in the answer, such reply constitutes the last pleading. (Peggy v. Tapucar, 88 SCRA 785)