*773In an action, inter alia, to recover damages for trespass, the defendants Erwin B. Zimmerman, Martha Zimmerman, Stephen Schoenfeldt, John H. Clary, Barbara J. Clary, and Eagle Excavating, Inc., appeal from an order of the Supreme Court, Suffolk County (R. Doyle, J.), dated September 4, 2007, which granted the plaintiffs’ motion for summary judgment on the issue of liability on their first and second causes of action and for summary judgment dismissing the defendants’ counterclaims as time-barred.
Ordered that the order is modified, on the law, by deleting the provision thereof granting that branch of the plaintiffs’ motion which was for summary judgment dismissing the defendants’ counterclaims as time-barred to the extent that those counterclaims allege damages resulting from erosion of the defendants’ properties caused by the plaintiffs’ activities, and substituting therefor a provision denying that branch of the plaintiffs’ motion to that extent; as so modified, the order is affirmed, without costs or disbursements.
The Supreme Court properly found that the plaintiffs were entitled to summary judgment on the issue of liability on their first cause of action, which was to recover damages for trespass, and their second causes of action, pursuant to which the plaintiffs sought to enjoin the defendants’ alleged continuing trespass. “Trespass is an intentional entry onto the land of another without justification or permission” (Woodhull v Town of Riverhead, 46 AD3d 802, 804 [2007]). Here, the plaintiffs satisfied their prima facie burden of establishing their entitlement to judgment as a matter of law on the issue of liability in connection with these causes of action by demonstrating that the defendants intentionally entered onto the land belonging to the plaintiffs “without justification or permission” (id.; see Long Is. Gynecological Servs. v Murphy, 298 AD2d 504 [2002]; Golonka v Plaza at Latham, 270 AD2d 667, 669 [2000]). In opposition, the defendants failed to raise a triable issue of fact as to whether they either had “a lawful right to enter these properties or had the owner’s permission” (State of New York v Johnson, 45 AD3d 1016, 1019 [2007]). Accordingly, the Supreme Court properly *774granted that branch of the plaintiffs’ motion which was for summary judgment on the issue of liability on these causes of action (see CPLR 3212 [b]; Zuckerman v City of New York, 49 NY2d 557, 562 [1980]; Friends of Animals v Associated Fur Mfrs., 46 NY2d 1065, 1067 [1979]).
The Supreme Court erred, however, in granting that branch of the plaintiffs’ motion which was to dismiss the defendants’ counterclaims as time-barred insofar as the counterclaims pertained to erosion of the defendants’ properties caused by the plaintiffs’ activities. Under CPLR 203 (d), “claims and defenses that arise out of the same transaction as a claim asserted in the complaint are not barred by the Statute of Limitations, even though an independent action by defendant might have been time-barred at the time the action was commenced” (Bloomfield v Bloomfield, 97 NY2d 188, 193 [2001]). “The provisions of CPLR 203 (d) allow a defendant to assert an otherwise untimely claim which arose out of the same transactions alleged in the complaint, but only as a shield for recoupment purposes, and does not permit the defendant to obtain affirmative relief” (DeMille v DeMille, 5 AD3d 428, 429 [2004]; see Delta Funding Corp. v Murdaugh, 6 AD3d 571, 571-572 [2004]; Rothschild v Industrial Test Equip. Co., 203 AD2d 271, 272 [1994]). Here, there is evidence that some of the defendants’ trespassing activities were undertaken in an attempt to correct damage that the plaintiffs admitted to having caused by excavating too deeply into their land abutting properties belonging to the defendants, and failing to leave a sufficient buffer area along the border. It is undisputed that these activities caused erosion on the affected properties, allegations concerning which form the basis of portions of the defendants’ counterclaims. Accordingly, the Supreme Court should have denied that branch of the plaintiffs’ motion which was to dismiss the counterclaims as time-barred to the extent that the damages sought in the counterclaims are for the erosion caused by the plaintiffs’ excavating activities, and/or to reimburse the defendants’ costs in attempting to correct the resulting damage. These damages should be applied to offset any damages award in favor of the plaintiffs and against the defendants (cf. Delta Funding Corp. v Murdaugh, 6 AD3d at 571-572; DeMille v DeMille, 5 AD3d at 429). Spolzino, J.P., Covello, Angiolillo and Dickerson, JJ., concur.