Plaintiffs commenced this action to obtain a judgment declaring their rights to use a beach and swimming area on the Great Sacandaga Lake in Fulton County and restraining defendants from interfering with the exercise of those rights. Plaintiff Howard M. Aison thereafter moved for an order enjoining defendant Lanzi's on the Lake, Inc. (hereinafter LLI) from excluding him from the beach area. LLI opposed the motion and cross-moved for an order pursuant to CPLR 1001 requiring Aison to name all necessary parties claiming a deeded right to use the beach. Supreme Court (Tomlinson, J.) ordered that plaintiffs be permitted access to the beach and, based upon a stipulation of the parties, ordered Aison to join all necessary parties on or before September 15, 1999. In May 1999, Aison moved for an order permitting a voluntary discontinuance of the action pursuant to CPLR 3217. In opposing Aison's motion, LLI indicated that it will assert a counterclaim based on its allegedly exclusive right to use the premises once all necessary parties
We affirm, as "[i]t is axiomatic that the authority to grant or deny a motion for discontinuance rests within the sound discretion of the trial court" (Matter of Bronsky-Graff Orthodontics, 270 A.D.2d 792, 793; see, Christenson v Gutman, 249 A.D.2d 805, 806). "Factors militating against discontinuance include prejudice to an opposing party as well as the imposition of one or more counterclaims [citation omitted]" (Matter of Bronsky-Graff Orthodontics, supra, at 793; see, Ruppert v Ruppert, 192 A.D.2d 925, 926). In addition, a party should not be permitted to discontinue an action for the purpose of circumventing an order of the court (see, Hirschfeld v Stahl, 242 A.D.2d 214, 215; NBN Broadcasting v Sheridan Broadcasting Networks, 240 A.D.2d 319).
Here, the record supports Supreme Court's findings that Aison was seeking a voluntary discontinuance in order to avoid the order requiring him to join all necessary parties and that discontinuance would prejudice LLI. We further note that an action to quiet title brought pursuant to RPAPL article 15 necessarily involves a determination of rights adverse to those claimed by plaintiffs and there is no indication here that all such rights have yet been resolved. Once a defendant has appeared and asserted its rights in the action, an attempt by a plaintiff to discontinue should be examined pursuant to CPLR 3217 rather than CPLR 1003, as Aison contends (see, Matter of Cowles, 22 A.D.2d 365, 370-371, affd 17 N.Y.2d 567). Thus, Supreme Court did not abuse its discretion in denying Aison's motion for a voluntary discontinuance.
Ordered that the order is affirmed, with costs.