Defendant appeals from the judgment of the Supreme Court, New York County (Erika M. Edwards, J.), entered October 13, 2022, bringing up for review an order, same court and Justice, entered October 18, 2021, which to the extent appealed from as limited by the briefs, granted Lafayette House’s motion for a final judgment on its cause of action for a declaratory judgment under Real Property Actions and Proceedings Law (RPAPL) article 15 and, in effect, directed entry of the judgment adjudging that Akasa was permanently enjoined and prohibited from obstructing or impeding the path of an express easement granted in 1981 and ordering Akasa to permanently remove certain easement obstructions to the path of the 1981 easement. PETER MOULTON, JUSTICE This appeal concerns a dispute between neighbors regarding two easements running through the lot that comprises 57 Crosby Street in Manhattan. Plaintiff 214 Lafayette House LLC (Lafayette House) owns the building located at 214 Lafayette Street, which is the dominant estate under the principal easement at issue. Defendant Akasa Holdings LLC (Akasa) owns the lot at 57 Crosby Street, which is the servient estate. Akasa also owns the first two floors of the residential cooperative building at 55 Crosby Street, just to the south of 57 Crosby. Four properties are affected by one or both of the two easements. Some orientation is necessary to understand why this is so. Crosby and Lafayette are adjacent, parallel streets running north and south. Two of the properties front on Crosby Street (55 Crosby and 57 Crosby) and the other two front on Lafayette Street (214 Lafayette and 216 Lafayette). 57 Crosby is directly to the north of 55 Crosby. 216 Lafayette is directly to the north of 214 Lafayette. 57 Crosby and 216 Lafayette abut at the rear. 55 Crosby and 214 Lafayette also abut at the rear. 57 Crosby is the only property of the four without a building. The lot contains some improvements, such as a gravel surface, some trees and shrubbery, one or more benches, and an approximately three-to-four foot high statue of the Hindu deity Ganesha. It is closed off from Crosby Street by a chain link fence. Most importantly for this appeal, 57 Crosby contains two staircases with landings, and an outdoor lift or elevator, abutting 55 Crosby along the lot’s southern border, all of which are used to access defendant’s apartment in 55 Crosby. The stairs and elevator (along with the perimeter fence, collectively referred to as the Encroachments) sit upon the principal easement at issue in this case, which was executed in 1981 (the 1981 Easement). The 1981 Easement was executed by a prior owner of all four properties, upon sale of 214 Lafayette to another entity. The 1981 Easement granted the new owner of 214 Lafayette certain easements against 216 Lafayette and 57 Crosby. As described by this Court in an earlier quiet title action between the parties: As against 216 Lafayette, [Lafayette House] was granted (1) an easement restricting the height of any building at 216 Lafayette to the height of the existing two-story building and (2) an easement “for emergency egress by foot over the roof” of the building at 216 Lafayette. As against 57 Crosby, [Lafayette House] was granted “a non-exclusive easement for ingress and egress by foot over a strip of land six feet wide contiguous to and north of the southerly border of…57 Crosby Street….” (Akasa Holdings, LLC v. 214 Lafayette House LLC, 177 AD3d 103, 108 [1st Dept 2019]). The 1981 Easement was initially properly recorded and indexed against 57 Crosby. However, the larger lot that included 57 Crosby was subsequently subdivided by the City, and because of filing errors the 1981 Easement ceased to be recorded with 57 Crosby in the City’s property records. In 1999, prior owners of 57 Crosby granted a second easement (the 1999 Easement) to the owners of 216 Lafayette. The 1999 Easement allows for egress from 216 Lafayette to Crosby Street over strips of land comprising 12 feet on 57 Crosby’s eastern border and a six-foot-wide path along 57 Crosby’s northern border, i.e. parallel to the six-foot-wide path on the lot’s southern border described in the 1981 Easement. From photos in the record, there appear to be obstructions, including trees and shrubbery, along the 1999 Easement. The impetus for both Easements was to provide alternate means of emergency egress for residents of 214 and 216 Lafayette in accordance with New York City’s fire code. One of plaintiff’s principals, Marcus Nispel, bought 214 Lafayette in 1994 and converted it to residential use in 1998. Nispel conveyed the property to Lafayette House in 2012. Akasa bought 57 Crosby and the shares comprising the first two floors of the residential cooperative at 55 Crosby in 2011. It appears that the Encroachments existed at the time of Akasa’s purchase of 57 Crosby. Both owners aver that they had no knowledge of the 1981 Easement when they purchased their respective properties.1 At first, Nispel enjoyed cordial relations with Anthony Krantz, Akasa’s principal. In 2013, when Nispel was having a dispute with the owner of 216 Lafayette concerning the latter’s intention of adding floors to his building, Krantz apparently hypothesized with Nispel that there may be some height limitation on 216 Lafayette, although he asserts he had no knowledge of the 1981 Easement at that time. This apparently caused Nispel’s attorney to research building records, which led to the discovery of the misfiled 1981 Easement. In 2014, at Lafayette House’s insistence, the City Register indexed the 1981 Easement against both 57 Crosby and 216 Lafayette. In October 2014, Lafayette House’s attorney wrote an email to Akasa’s attorney explaining that the City had corrected the misfiling of the 1981 Easement and requesting that Akasa sign a declaration acknowledging the 1981 Easement. Akasa declined to sign the declaration, and instead sought to nullify the 1981 Easement’s effect on 57 Crosby via the aforementioned quiet title proceeding against Lafayette House (see Akasa Holdings, LLC, 177 AD3d at 111). In the quiet title proceeding, Akasa argued that it had purchased 57 Crosby for value without notice of the 1981 Easement. Based on this contention, Akasa sought a declaration that it held title to 57 Crosby free from any easement in favor of Lafayette House. In a decision dated March 14, 2018, Supreme Court granted summary judgment to Lafayette House, confirming the validity and enforceability of the 1981 Easement. That decision was affirmed on alternate grounds by this Court (id. at 106, 118-127). Separately, Akasa’s title insurer brought a declaratory judgment action concerning issues arising from its failure to discover the 1981 Easement. The matter went to arbitration and in June 2018, Akasa was awarded $130,000 for the reduction in value caused by the 1981 Easement. After the trial court issued its decision in the quiet title action, Lafayette House made a first demand on Akasa to remove the Encroachments facing Crosby Street. Upon Akasa’s refusal, Lafayette House commenced this action seeking to enforce the 1981 Easement by ordering Akasa to remove the Encroachments. Akasa asserted affirmative defenses, including that it was entitled to maintain the encroachments based on adverse possession and equitable defenses of, as relevant here, laches and unclean hands. Akasa also asserted a counterclaim for declaratory relief determining that the 1981 Easement had been extinguished by adverse possession. After conducting some discovery, both parties moved for partial summary judgment. As relevant here, plaintiff moved for partial summary judgment on its first cause of action for a permanent injunction prohibiting Akasa from obstructing the 1981 Easement and compelling Akasa to remove the Encroachments so that plaintiff’s property complied with the fire code. Plaintiff also sought dismissal of defendant’s counterclaim, arguing that defendant’s claim of adverse possession was barred by res judicata as it could have been raised in the quiet title action. Plaintiff further argued that defendant’s adverse possession counterclaim failed on the merits because defendant’s possession did not become adverse until Akasa refused to remove the Encroachments. Akasa cross-moved for partial summary judgment on its adverse possession counterclaim and equitable defenses, as well as unclean hands and relocation of the 1981 Easement. In support, Akasa offered the affidavit of architect Brian Gillen. In the affidavit, Gillen set forth various alternatives to removing the staircases and elevator while still providing an easement for egress to 214 Lafayette. He noted in his affidavit that he has discussed the alternative of using the 1999 Easement for the egress of the residents of 214 Lafayette with John Raine, the Manhattan Borough Commissioner of the Department of Buildings (DOB), and he attached a form indicating Raine’s approval of this modification. Plaintiff took issue with Gillen’s affidavit, asserting that Raine’s preliminary approval did not guarantee DOB approval for rerouting and that the description of 57 Crosby seemed divorced from the property’s actual current condition. Plaintiff also decried the absence of discovery from Gillen. Supreme Court found in favor of Lafayette House on its first cause of action based on the 1981 Easement.2 The court found that Akasa was barred by res judicata from invoking adverse possession because it could have asserted that claim in the quiet title proceeding. The court also found that Akasa had not made out its defenses under laches and unclean hands. The court directed entry of judgment directing that Akasa be permanently enjoined and prohibited from obstructing or impeding the path of the 1981 Easement and directed it to remove any and all obstructions on that path. We now modify. We agree with Supreme Court that res judicata bars Akasa’s assertion of adverse possession. “Under the doctrine of res judicata, a party may not litigate a claim where a judgment on the merits exists from a prior action between the same parties involving the same subject matter” (Matter of Hunter, 4 NY3d 260, 269 [2005]). Res judicata “applies not only to claims actually litigated but also to claims that could have been raised in the prior litigation” (id. at 269 [emphasis added]). New York follows a “transactional analysis approach in deciding res judicata issues,” meaning that “once a claim is brought to a final conclusion, all other claims arising out of the same transaction or series of transactions are barred, even if based upon different theories or if seeking a different remedy” (O’Brien v. City of Syracuse, 54 NY2d 353, 357 [1981]). To determine if a claim is barred, we use a “pragmatic test…analyzing whether the facts are related in time, space, origin, or motivation,” or “whether they form a convenient trial unit” (Xiao Yang Chen v. Fischer, 6 NY3d 94, 100-101 [2005]). Thus, “once a claim is brought to a final conclusion, all other claims arising out of the same transaction or series of transactions are barred” (Matter of Josey v. Goord, 9 NY3d 386, 389-390 [2007]). It is undisputed that the 2016 action involved the same parties and resulted in a final judgment on the merits. Because an easement “can be extinguished by adverse possession,” Akasa’s claim here is an alternative theory to the relief it sought in the 2016 action, i.e., title free and clear of the 1981 easement (Spiegel v. Ferraro, 73 NY2d 622, 625 [1989]). Further, Akasa’s adverse possession claim is “related in time, space, origin, or motivation” and forms a “convenient trial unit” to its claim in the 2016 claim (Xiao Yang Chen, 6 NY3d at 100-101). Supreme Court therefore correctly determined that res judicata bars Akasa’s adverse possession defense and counterclaim. Neither party disputes that Lafayette House did not seek removal of the Encroachments in the quiet title action. However, Lafayette House was not required to do so. New York follows a “permissive counterclaim rule,” which allows “counterclaims to be raised through separate litigation” (see Classic Autos., Inc. v. Oxford Resources, Corp., 204 AD2d 209, 209 [1st Dept 1994]). Thus, Lafayette House is not barred from making such a demand in the instant litigation. However, Supreme Court erred in dismissing Akasa’s affirmative defenses of unclean hands and laches. “To charge a party with unclean hands, it must be shown that said party was ‘guilty of immoral or unconscionable conduct directly related to the subject matter’” (Citibank, N.A. v. American Banana Co., Inc., 50 AD3d 593, 594 [1st Dept 2008], quoting Frymer v. Bell, 99 AD2d 91, 96 [1st Dept 1984]) and that “the party seeking to invoke the doctrine was injured by such conduct” (Weiss v. Mayflower Doughnut Corp., 1 NY2d 310, 316 [1956]). While Lafayette House argues that the equities weigh in its favor, the record raises outstanding issues of fact as to whether either party acted with unclean hands in resolving their dispute. For example, Nispel testified at his deposition that he wanted to remove the Encroachments because they matter to Krantz, which Akasa argues shows that Lafayette House is acting out of spite and not in good faith. Additionally, it appears that alternative means of egress through 57 Crosby are readily available without requiring removal of the Encroachments. For its part, Lafayette House maintains that it has a valid reason for not settling, which is to bring its property into compliance with the fire code and maintain its certificate of occupancy. Nispel testified that he is wary of entering into an informal agreement with Krantz that might not be honored by a future owner of 57 Crosby. For similar reasons, outstanding issues of fact exist as to Akasa’s laches defense. The “essential elements” of laches “are unreasonable and inexcusable delay by the plaintiff in undertaking to enforce his rights, which result in prejudice to the opposing party” (Dante v. 310 Assocs., 121 AD2d 332, 333 [1st Dept 1986]). The record raises questions of fact as to whether Lafayette House delayed in seeking the relief sought herein and whether Akasa was thereby prejudiced. While Lafayette House claims that it learned of the easement in 2017, it re-recorded the easement in 2014. Additionally, there is evidence that Nispel relied on the 1981 easement in his 1998 conversion application. Accordingly, there are outstanding issues of fact as to when Lafayette House learned of the easement and if it delayed in asserting its rights. Because a “mere lapse of time, without a showing of prejudice, will not sustain a defense of laches,” Supreme Court must also determine whether Akasa was prejudiced by any delay (Saratoga County Chamber of Commerce, Inc. v. Pataki, 100 NY2d 801, 816 [2003], cert denied 540 US 1017 [2003]). The record is inconclusive on this issue. While defendant claims that it would be in violation of the New York City Building Code if forced to remove its elevator, plaintiff counters that there is no evidence to support Akasa’s claim other than Gillen’s understanding that the elevator may provide wheelchair access. Akasa also argues that it will be prejudiced if forced to remove the Encroachments as Krantz will then be unable to access his residence, but there is evidence in the record that his apartment can be accessed via 55 Crosby Street. We have considered the parties’ remaining arguments and find them unavailing. Accordingly, the judgment of the Supreme Court, New York County (Erika M. Edwards, J.), entered October 13, 2022, bringing up for review an order, same court and Justice, entered October 18, 2021, which to the extent appealed from as limited by the briefs, granted Lafayette House’s motion for a final judgment on its cause of action for a declaratory judgment under RPAPL article 15 and, in effect, directed entry of the judgment adjudging that Akasa was permanently enjoined and prohibited from obstructing or impeding the path of an express easement granted in 1981 and ordering Akasa to permanently remove certain easement obstructions to the path of the 1981 easement, should be modified, on the law, to vacate the judgment insofar as it awarded Lafayette House a declaratory judgment and to reinstate Akasa’s unclean hands and laches defenses, and otherwise affirmed, without costs. Judgment, Supreme Court, New York County (Erika M. Edwards, J.), entered October 13, 2022, bringing up for review an order, same court and Justice, entered October 18, 2021, modified, on the law, to vacate the judgment insofar as it awarded Lafayette House a declaratory judgment and to reinstate Akasa’s unclean hands and laches defenses, and otherwise affirmed, without costs. Opinion by Moulton, J. All concur. Kern, J.P., Oing, Moulton, Gesmer, Mendez, JJ. THIS CONSTITUTES THE DECISION AND ORDER OF THE SUPREME COURT, APPELLATE DIVISION, FIRST DEPARTMENT. Dated: March 28, 2024